diff --git a/pkg/obioptions/version.go b/pkg/obioptions/version.go index b04e191..5124a22 100644 --- a/pkg/obioptions/version.go +++ b/pkg/obioptions/version.go @@ -7,7 +7,7 @@ import ( // TODO: The version number is extracted from git. This induces that the version // corresponds to the last commit, and not the one when the file will be // commited -var _Commit = "c94e79b" +var _Commit = "ab9b472" var _Version = "Release 4.2.0" // Version returns the version of the obitools package. diff --git a/pkg/obiutils/goutils.go b/pkg/obiutils/goutils.go index 01aade5..0dbc8fd 100644 --- a/pkg/obiutils/goutils.go +++ b/pkg/obiutils/goutils.go @@ -8,7 +8,7 @@ import ( "reflect" "sync" - "github.com/bytedance/sonic" + "github.com/goccy/go-json" "github.com/barkimedes/go-deepcopy" ) @@ -369,7 +369,8 @@ func AtomicCounter(initial ...int) func() int { // It takes a bytes.Buffer as a buffer and an interface{} as i. // Returns an error. func JsonMarshalByteBuffer(buffer *bytes.Buffer, i interface{}) error { - encoder := sonic.ConfigDefault.NewEncoder(buffer) + encoder := json.NewEncoder(buffer) + encoder.SetEscapeHTML(false) err := encoder.Encode(i) b := buffer.Bytes() b = bytes.TrimRight(b, "\n")