Add 'readText()' method in JsonParser #15

Open
cowtowncoder opened this Issue May 27, 2012 · 0 comments

Projects

None yet

1 participant

@cowtowncoder
Member

Current JsonParser.getText() requires reading of the whole JSON String value as String.
While convenient, this may not be optimal when processing large payloads.

As an alternative method, there should be something like:

boolean readText(Writer w);

which would read JSON String value, and pass it using given Writer; but possibly in separate chunks, without aggregating it. This allows caller to do incremental processing and avoid potentially big temporary memory usage.

In addition, for non-blocking parser implementations, this method could do partial decoding, meaning that it would only parse part of textual value; return value indicating whether full contents (true) or partial content (false) was processed.

@LokeshN LokeshN added a commit to LokeshN/jackson-core that referenced this issue May 15, 2016
@LokeshN LokeshN issue #15 - readtext in jsonparser b42a4da
@LokeshN LokeshN added a commit to LokeshN/jackson-core that referenced this issue May 16, 2016
@LokeshN LokeshN issue #15 - readtext in jsonparser
Review changes
a8855fa
@LokeshN LokeshN added a commit to LokeshN/jackson-core that referenced this issue May 16, 2016
@LokeshN LokeshN issue #15 - readtext in jsonparser
Review changes
373588c
@LokeshN LokeshN added a commit to LokeshN/jackson-core that referenced this issue May 18, 2016
@LokeshN LokeshN issue #15 - readtext in jsonparser
Review changes
ef7e8a2
@LokeshN LokeshN added a commit to LokeshN/jackson-core that referenced this issue May 18, 2016
@LokeshN LokeshN issue #15 - readtext in jsonparser ca17d2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment