Class 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 Detail

      • JsonArrayParser

        public JsonArrayParser()
    • Method Detail

      • process

        public void process​(byte[] inputBuffer_,
                            int nbytes)
      • handle

        protected abstract void handle​(String input)
      • close

        public void close()