-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for streams of JSON data and incremental parsing? #426
Comments
does something like https://github.com/beached/daw_json_link/blob/release/docs/cookbook/unknown_types_and_raw_parsing.md handle that for you? then later use something like a |
From the example, I can't tell if json_raw accepts an incomplete json value. Would it be able recognize obj1's name and the other members "header" and "nestedClassHeader" if the string only contained up to say 3 array elements of ob1["data"] . I am trying to avoid storing the entire array all at once since the array nested inside of "data"'s elements could contain several thousand arrays, on top of data possibly containing several thousand elements. |
It defaults to a json_value which would hold the character positions of that member(like a string_view) and let you parse it later, it just skips it for now. |
Ah okay, that sounds like it will need to be a seekable stream then. Are there any examples for constructing a json_value from a custom stream class rather than a contiguous string/string_view? |
Hi,
I'm researching switching from rapidJSON to DAW JSON link for my project in order to avoid allocation. One of the features that rapidJSON supports is a custom stream that can be used for its parser. My project uses a large JSON file, containing a few objects with large nested arrays, which is then compressed. I would like to avoid having to allocate a large string buffer for the entire decompressed JSON file and instead use a small buffer for a part of the decompressed data and then incrementally deserialize the nested arrays and outer arrays into their own classes. Is something like this possible with this library?
Here is an example of what I'm looking for
Sample JSON
Obj 1 and 2 would contain name, value and then a vector of "nestedClasses"
The text was updated successfully, but these errors were encountered: