Class ByteBufJsonParser

java.lang.Object
com.couchbase.client.core.utils.yasjl.ByteBufJsonParser

public class ByteBufJsonParser
extends Object
The ByteBufJsonParser allows to query for values identified by JsonPointer in Netty ByteBuf. A couple of notes: - it strictly works on UTF-8 - it is not a json validator - it parses up to the given JsonPointer paths and returns their value - it is not thread safe!
Author:
Subhashni Balakrishnan
  • Constructor Details

    • ByteBufJsonParser

      public ByteBufJsonParser​(JsonPointer[] jsonPointers)
      Creates a new ByteBufJsonParser and initializes all of its internal processors.
      Parameters:
      jsonPointers - the pointers which should be set.
  • Method Details

    • initialize

      public void initialize​(ByteBuf content)
      (re)initializes this parser with new content.
      Parameters:
      content - the content used for parsing.
    • parse

      public void parse() throws EOFException
      Instructs the parser to start parsing the current buffer.
      Throws:
      EOFException - if parsing fails.