News for hackers. Stuff that matters.
Re:XML is almost always misused by fanf2 on Tuesday October 29, 2019 @05:58PM (#21392536)
There is no reason you can’t do a SAX-style parser for JSON. A quick bit of searchengineering will find dozens, eg. https://github.com/dgraham/json-stream
Re:XML is almost always misused by mojuba on Tuesday October 29, 2019 @08:52PM (#21393643)
You can in principle, but because the order is not guaranteed, you may find yourself accumulating things in memory. It depends on the task of course, but neither standard parsers nor generators are required to send adjacent JSON entities in a specific order.

I remember someone describing a trick where instead of sending a JSON array they'd just send a stream of JOSN objects, one per line, so that the receiving end could parse the data in a streaming fashion. But that's not JSON anymore.

Re:XML is almost always misused by fanf2 on Saturday November 02, 2019 @03:22PM (#21429472)
JSONlines is a relatively common technique http://jsonlines.org/
Re:XML is almost always misused by hnick on Tuesday October 29, 2019 @11:47PM (#21394525)
Almost sounds like JSON is the new "we use CSV, but..."