Enable to skip content reading/materialization
Follow up of https://github.com/eclipse-ee4j/jsonb-api/issues/224#issuecomment-590126204
Would be neat to have a way to skip some elements so instead of materializing it. Concretely it means next will need a skip equivalent, visiting the stream but ignoring the content. GetXxx would fail if called after a skip.
There is nothing in the JSON-P API that prevents an implementation from lazily fetching entries, is there? My understanding is that the call to next() advances the stream and subsequent getXXX() call are used to to fetch entries. An implementation should be free to optimize away any materialization of intermediate entries if getXXX() is never called.
This is my understanding as well. There is also JsonParser#skipObject() and skipArray() which can be used to avoid even having to manifest the skipped events.
There is nothing in the JSON-P API that prevents an implementation from lazily fetching entries, is there?
There is nothing which enforces it so assume it is not the case (spec world).
Does JSON-P even have a published spec? All I can find is the API.
There is no spec document for JSON-P. The Javadocs/TCK constitute the spec.