You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2020. It is now read-only.
This pull requests adds "SAX" like event driven parsing to json11. When parsing lots of objects, it allows having access to them without waiting for the whole parsing to finish. It should also limit memory usage.
This is a tentative request, it still needs work but I wanted to know if you would be open to such a feature and how you would envision it. I still need to
write tests,
avoid keeping all data in memory.
Also I'm not an expert in C++ so do not hesitate to point me to the problems in my code.
Hi @canatella. Trying to get caught up on PR's during the holiday lull.
I'm not opposed to supporting event-based parsing in theory (though I wonder if @j4cbo has thoughts as primary author). The current strategy of mixing it into the standard parser does seem not to get most of the benefit, due to keeping everything in memory as you mention. In most cases there wouldn't really be a benefit to using the events, vs. finishing the parse and then examining the resulting object. You could get earlier results on a streaming parse, but that should only be relevant for long streams, in which case the memory size would be an issue. My guess is that if you wanted the full benefit of this style of parser, you'd want it to be the primary parse mechanism, then have the "standard" parse be built as an event handler.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull requests adds "SAX" like event driven parsing to json11. When parsing lots of objects, it allows having access to them without waiting for the whole parsing to finish. It should also limit memory usage.
This is a tentative request, it still needs work but I wanted to know if you would be open to such a feature and how you would envision it. I still need to
Also I'm not an expert in C++ so do not hesitate to point me to the problems in my code.