2 ms·
I like the "does the problem justify the solution's complexity" question. The deserialization performance improvement seems like an actually important benefit t
by dematz 1y ago
I like the "does the problem justify the solution's complexity" question. The deserialization performance improvement seems like an actually important benefit though.
Also https://antonz.org/go-json-v2/#marshalwrite-and-unmarshalread https://antonz.org/go-json-v2/#marshalwrite-and-unmarshalrea... not completely sure but maybe combining
dec := json.NewDecoder(in)
dec.Decode(&bob)
to just
json.UnmarshalRead(in, &bob)
is nicer...mostly the performance benefit though
- dematz 1y agoAlthough actually, for streaming maybe it would still be 2 lines but from jsontext.. dec := jsontext.NewDecoder(in) json.UnmarshalDecode(in, &bob)