easyjson
easyjson copied to clipboard
Fast JSON serializer for golang.
This PR changes two things: - It adds a boolean `ptr_receivers` flag (default `false`), that, when set to true, causes generated `Marshal[Easy]JSON` methods to be generated with a pointer receiver...
According to https://golang.org/pkg/encoding/json/#Unmarshal Unmarshal matches incoming object keys to the keys used by Marshal (either the struct field name or its tag), preferring an exact match but also accepting a...
I use `v0.7.7`, code with generics fails: ``` Error parsing model.go: model.go:41:27: expected ';', found '[' (and 2 more errors) model.go:1: running "easyjson": exit status 1 ``` Any plans to...
Inserting directly a slice into a sync.Pool object caused the allocation for an extra object every Put call. Avoid it using unsafe.Pointer to the underlying array.
This option makes unmarshalling return an error if a field appears in the json more than once. This option can be useful as a precaution against JSON Interoperability Vulnerabilities, see...
Could you please tag a new version with the "recent" fixes?
It would be nice if easyjson worked in tinygo so it could be used on embedded systems that normal go does not target. Easygo's tests do not yet run in...
Hi. My golang version is go1.18.3 linux/amd64 I ran the command: rav@PC:~/Go/MFTI/perfomance/json$ easyjson struct.go And got an error: \# command-line-arguments main.main: relocation target type.json_test.EasyJSON_exporter_User not defined Bootstrap failed: exit status...
The standard library `encoding/json` allows it by default. Fix #237
stdlib json behaviour: https://play.golang.org/p/6DIsQk0xeMZ Yet when I use json.Number as type with easyjson it is being Marshaled into a string. From generated file: `out.String(string(in.PriceBaseFare))` where `PriceBaseFare` is defined as: `PriceBaseFare...