bolerio / mjson

Lean JSON Library for Java, with a compact, elegant API.
Apache License 2.0
83 stars 24 forks source link

Add a stream parser #31

Open bolerio opened 6 years ago

bolerio commented 6 years ago

Parsing currently assumes we have the full document and it's a one short operation. But for processing streams of Json documents a user of mjson needs to do extra work to separate the start and end of documents which amounts almost to a full parsing as well. Instead, we should have a Stream<Json> readStream(source) method that does that automatically.