[haiku-development] Re: Review; JSON Parser Changes

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 28 Apr 2017 07:23:33 +0000

28 avril 2017 09:16 "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> a écrit:

Am 28/04/2017 um 03:41 schrieb waddlesplash:

What exactly is this needed for, really? If you're returning JSON
payloads so large that you should parse them incrementally rather than
all in one go, then your JSON payloads should really be broken up into
multiple ones, or you might be using JSON for something it's not
designed for. [...]

JSON is a generic data container. It can contain hundreds of MB without any 
issue. It might not
have been it's original *purpose*, but it's well designed to handle that.
In fact, it's also actively being used with such huge payloads. For example, 
one of our clients
fills his web shop via one huge JSON file -- for well over 10000 articles 
with several dozen
properties.

I can see some other uses for rather large JSON files.

One is the Google Code-In web app, for which I have started work on a native 
Haiku UI. Their API allows us to download the whole list of tasks, complete 
with description, and possibly for multiple context instances (previous years, 
etc).

The other is the package buildbot output, which is a complete list of all 
packages with dependencies and everything. It is a few megabytes large and 
could definitely be handled with something like this.

So, +1 to the idea.

-- 
Adrien.

Other related posts: