Comment on A new experimental Go API for JSONparentComments−dematz1yI 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-unmarshalrea... not completely sure but maybe combiningdec := json.NewDecoder(in)dec.Decode(&bob)to justjson.UnmarshalRead(in, &bob)is nicer...mostly the performance benefit though−dematz11moAlthough actually, for streaming maybe it would still be 2 lines but from jsontext..dec := jsontext.NewDecoder(in)json.UnmarshalDecode(in, &bob)
Comments
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-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
Although actually, for streaming maybe it would still be 2 lines but from jsontext..
dec := jsontext.NewDecoder(in)
json.UnmarshalDecode(in, &bob)