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
I'm interested in using JSON-P and JSON-P together in order to efficiently process large JSON data sets while retaining the convenience of POJO mapping. I've raised an issue with the JSON-B API to that end, but one of the sticking points is the ability to properly position a JsonParser for use by JSON-B. It would be convenient if JsonParser had a peek() method that could return the next event without consuming it.
The text was updated successfully, but these errors were encountered:
emattheis
changed the title
support peek() for next event in JsonParser
support retrieval of the event for the current parsing state in JsonParser
Feb 21, 2020
After thinking about this more carefully, it seems that providing access to the current event is likely much more efficient than trying to provide lookahead support. For the use case I'm interested in, a JsonParser instance could be advanced to the correct location and then passed to a Jsonb instance to deserialize a mapped POJO but the Jsonb needs to be aware of the current event, otherwise it must call next() which means the caller has to advance the stream only to the position directly before the correct location. This forces the caller to make assumptions about the future state of the stream and depend on error handling to recover if those assumptions don't hold.
I'm interested in using JSON-P and JSON-P together in order to efficiently process large JSON data sets while retaining the convenience of POJO mapping. I've raised an issue with the JSON-B API to that end, but one of the sticking points is the ability to properly position a
JsonParser
for use by JSON-B. It would be convenient ifJsonParser
had apeek()
method that could return the next event without consuming it.The text was updated successfully, but these errors were encountered: