Skip to content

Comment on A new experimental Go API for JSONparent

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)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.