3 ms·
> use an evented parser I've never heard of this. A google search isn't particularly illuminating. What is an "evented parser"?
by recursive 5y ago
> use an evented parser
I've never heard of this. A google search isn't particularly illuminating. What is an "evented parser"?
- dragonwriter 5y ago> 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.
- throw_m239339 5y agoGoogle "event-based parser"
- rovolo 5y agoThe sibling comments are good descriptions, but here are example interfaces: - Normal parser https://www.javadoc.io/static/com.google.code.gson/gson/2.8.8/com.google.gson/com/google/gson/JsonParser.html 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/com.google.gson/com/google/gson/stream/JsonReader.html https://www.javadoc.io/doc/com.google.code.gson/gson/latest/...
- Smaug123 5y agoJust a parser which fires events you can listen on when its internal state machine changes state.