Skip to content

v0.2.0

Compare
Choose a tag to compare
@520MianXiangDuiXiang520 520MianXiangDuiXiang520 released this 13 Jun 14:28
· 6 commits to main since this release

自定义json的解释器,不用先使用 decode/json 序列化反序列化即可实现 json 字符串和 JsonNode 对象之间的相互转换,提高性能:

>go test -bench=.
goos: windows
goarch: amd64
pkg: github.com/520MianXiangDuiXiang520/json-diff
BenchmarkMarshal-4                 27956             43720 ns/op
BenchmarkMarshalOld-4              21774             51417 ns/op
BenchmarkUnmarshal-4               21921             58335 ns/op
BenchmarkUnmarshalOld-4            19902             57680 ns/op
PASS
ok      github.com/520MianXiangDuiXiang520/json-diff    7.533s