Package org.symphonyoss.s2.canon.runtime
Class JsonArrayParser
- java.lang.Object
-
- org.symphonyoss.s2.canon.runtime.JsonArrayParser
-
public abstract class JsonArrayParser extends Object
A parser which takes byte buffers and accumulates a JSON document. If the document is a JSON array then each element of the array is passed to the handle method, one at time. Otherwise the entire document is passed to the handle method. This is intended to be used as a pre-processor to a JSON parser (e.g. Jackson) so that streaming processing of multiple instance payloads can be implemented.- Author:
- Bruce Skingle
-
-
Constructor Summary
Constructors Constructor Description JsonArrayParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected abstract voidhandle(String input)voidprocess(byte[] inputBuffer_, int nbytes)
-
-
-
Method Detail
-
process
public void process(byte[] inputBuffer_, int nbytes)
-
handle
protected abstract void handle(String input)
-
close
public void close()
-
-