Multiple JSON libraries #20
jessepeterson
started this conversation in
Technical
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're using multiple JSON libraries for generating and parsing JSON. Namely the standard library
json
package as well as fastjson. We use fastjson mostly for parsing e.g. Declarations and Status Items (with a bit of rendering JSON for embedded objects). But we also usejson.Marshal()
and unmarshal (even for generateinterface{}
types). The idea behind fastjson was less to do with speed and more to do with a better interface for parsing and accessing arbitrary JSON for e.g. the status reports. It turned out it worked well for parsing Declarations as well. To consider making these consistent, however fastjson doesn't have a struct-parsing or marshaling feature so it makes it ill-suited for some things without a ton of boilerplate.Beta Was this translation helpful? Give feedback.
All reactions