Open GoogleCodeExporter opened 8 years ago
Any movement on this? Has a patched been created for this yet? I'm just running
across a case where I want to do this.
Original comment by drizzt...@gmail.com
on 15 Nov 2011 at 11:54
I postponed creating the patch but if you need it I can submit it in one day.
Original comment by viktor.t...@gmail.com
on 16 Nov 2011 at 1:16
I made a work-around. Basically read in data until I reach the end of the JSON
object from the file, and pass that into the parser. Rinse & repeat.
Would still be a nice to have.
Original comment by drizzt...@gmail.com
on 16 Nov 2011 at 6:29
I tried to do it but it's much harder than I originally thought because of this:
"the old input stream cannot be reused (internal buffer is discarded and lost)."
(comment from the Lexer)
The lexer is reads ahead and when I invoke again "parse" method even on a new
JSONParser instance, the reader is in a wrong position. Maybe at EOF.
Currently I don't have idea for resolving this.
Original comment by viktor.t...@gmail.com
on 17 Nov 2011 at 5:21
Hi, you can define a higher level protocol if you want to carry multiple JSON
objects in a single stream. For example, define the stream as the following:
<separator> JSON 1 <separator> JSON 2 ...
Then implement your owner reader which returns JSON stream between separators.
Hope that helps.
Original comment by fangyid...@gmail.com
on 17 Nov 2011 at 10:05
Maybe create a parser and pass it an InputStream/Reader and create a
PushBackReader around that, which lets you push data back onto the buffer.
Original comment by drizzt...@gmail.com
on 17 Nov 2011 at 5:38
Original issue reported on code.google.com by
viktor.t...@gmail.com
on 20 Oct 2011 at 12:14