Closed vmalyasov closed 6 years ago
There isn't, no. sajson relies on having the entire input document available. (Fortunately, sajson parses at a rate of hundreds of MB per second, so streaming should not be necessary except in the most extreme cases.)
Curious: what use case are you imagining?
We make several async http requests from the server and every request contains the huge JSON, and to avoid extra memory allocation (in my case for a mobile app) we should use stream parsing
Ah, yeah. If keeping the entire JSON document in memory is not desirable, sajson is not a good fit. :/ I would look for a streaming parser.
Cheers!
Is there a way to parse the JSON string from a network stream (JSON as bytes stream or data chunks)?