I need document for go.
This is good projects, But no more information for example, Could you write more example? And I can't find any document for your website about go version.
i need too
jsoniter.Marshal is a drop-in replacement for json.Marshal
jsoniter.Unmarshal is a drop-in replacement for json.Unmarshal
all your experience of using the standard library can be reused
Hey everyone
I was wondering about the performance because I did not find anything about it. So, I did sample benchmarks, and they are pretty awesome, sharing the results:
BenchmarkStandartJsonUnmarshal-8 10000 137219 ns/op 59.39 MB/s 33670 B/op 691 allocs/op BenchmarkJsonIteratorUnmarshal-8 20000 76422 ns/op 106.64 MB/s 36308 B/op 680 allocs/op BenchmarkStandartJsonMarshal-8 300000 4549 ns/op 120.45 MB/s 1544 B/op 6 allocs/op BenchmarkJsonIteratorMarshal-8 500000 2733 ns/op 200.45 MB/s 2832 B/op 11 allocs/op
The project is so easy to use although the doc is simple!
hi,I want user json-iterator/go to instead encoding/json to marshal struct. The structure is at the bottom.I already can use var json = jsoniter.ConfigCompatibleWithStandardLibrary &&json.Marshal() replace func into encoding/json. Now I find a best performence func in json-iterator which use jsoniter.RegisterTypeEncoder or jsoniter.RegisterTypeDecoder instead of defining MarshalJSON or UnmarshalJSON. Marshaler or Unmarshaler by read document.
But I don't find any example in document. Is there an example of using this function? Thank you very much.@taowen
Type info struct {
Name string
Agd int
Addr string
Birth string
Others map[string]interface{}
}
this is an example https://github.com/json-iterator/go/blob/be70f29b04dea7efb4d82a8989c33aee989b74d1/extra/time_as_int64_codec.go