Add new method like JsonParser.readText(Writer)
(and implementation) for truly non-buffering reads
#1288
Labels
performance
Issue related to performance problems or enhancements
(note: off-shoot of FasterXML/jackson#221)
(note: was earlier filed as #15, mea culpa)
Currently there is no way to access contents of long JSON String values without buffering of all contents in memory: even metho
will temporarily buffer contents in
TextBuffer
(but avoids construction of bigString
unlikegetText()
).But it would be possible and desirable to have an alternative that would decode and provide content without buffering; similar to how Stax2-compliant XML parsers (Aalto, Woodstox) do it.
Semantic difference would be that such method, f.ex
would read, pass and consume contents, such that after call finishes, parser now points to the end of text value, and text value could no longer be read.
Because of this change, we cannot change implementation of existing
getText(Writer)
I will also update Javadocs of
getText(Writer)
to indicate use of buffering.The text was updated successfully, but these errors were encountered: