News for hackers. Stuff that matters.
Re:Parsing JSON Is a Minefield (2016) by 35fbe7d3d5b9 on Monday October 11, 2021 @09:30AM (#28828092)
> I highly encourage any greenfield project to look into well designed and better specified alternatives.

By way of recommendation: I reach for protobufs to do data interchange between polyglot systems and have yet to be disappointed. Even if you aren't getting into gRPC, having data interchange backed by codegen and an IDL removes a lot of the risk you get with data interchange.

Re:Parsing JSON Is a Minefield (2016) by theamk on Monday October 11, 2021 @02:52PM (#28831590)
In my experience, protobuf has a minimum project complexity threshold before it starts to make sense.

Yes, if both sides of your interchange are systems which have build infra setup, it provides a better experience. But if you need to access data from outside of your usual projects, or from shell, or from random data analysis notebooks, It becomes a major pain.

Recent example: we’ve had an orchestrator script which was written in “python with stdlib only” - no build step, download an archive, extract and run. This script had to talk to third-party program which would export protobuf only. This was a major pain as yon can imagine.

Re:Parsing JSON Is a Minefield (2016) by avmich on Monday October 11, 2021 @11:16AM (#28829287)
In my experience JSON allowed absence of codegen and superior schema definition capabilities to protobuf, and also nice transformations with parts of jq built into JSON libraries. Try to limit structure complexity to something which can be verified before usage, yes. YMMV.