Re:Parsing JSON Is a Minefield (2016)
by dragonwriter on Monday October 11, 2021 @01:26PM
(#28830701)
> What is an "evented parser"?
Also knowns as a “streaming parser”, its a parser that takes in a data stream and produces a stream of events which client code can handle; it allows more flexible handling than deserializers, including ability to handle arbitrarily large input. SAX is a streaming/evented parser API for XML, and there are similar ones for other formats.
The sibling comments are good descriptions, but here are example interfaces:
- Normal parser https://www.javadoc.io/static/com.google.code.gson/gson/2.8....
- Streaming parser https://www.javadoc.io/doc/com.google.code.gson/gson/latest/...
Just a parser which fires events you can listen on when its internal state machine changes state.
Re:Parsing JSON Is a Minefield (2016)
by throw_m239339 on Monday October 11, 2021 @01:21PM
(#28830653)
Google "event-based parser"
I've never heard of this. A google search isn't particularly illuminating. What is an "evented parser"?