OK. Interesting. One of the benefits of JSON is that it is ad-hoc extensible. Otherwise why not use an efficient binary format? When more strongly typed environments add JSON support they often screw this up, which is unfortunate.
Maybe an opportunity for someone to write another library to better support more idiomatic usage of JSON.
Re:Web Development in Go
by stock_toaster on Tuesday April 11, 2017 @04:53PM
(#14092334)
Yup. I agree with pretty much everything you said.
I had to deal with large volumes of json (think log streams) that while they shared many top level attributes, also had had accreted many "optional" components with "types" that depended on the values of certain attributes (each with different nested elements too). While awkward to deal with in python (lots of `if x in y['thing']` checks), this was very cumbersome to deal with in Go. It required lots of reflection and ended up being comparatively slow (python json parsing is actually pretty zippy).
It just isn't one of Go's stronger suits in my opinion.