Class ByteBufJsonParser
- java.lang.Object
-
- com.couchbase.client.core.utils.yasjl.ByteBufJsonParser
-
public class ByteBufJsonParser extends Object
TheByteBufJsonParser
allows to query for values identified byJsonPointer
in NettyByteBuf
. A couple of notes: - it strictly works on UTF-8 - it is not a json validator - it parses up to the givenJsonPointer
paths and returns their value - it is not thread safe!- Author:
- Subhashni Balakrishnan
-
-
Constructor Summary
Constructors Constructor Description ByteBufJsonParser(JsonPointer[] jsonPointers)
Creates a newByteBufJsonParser
and initializes all of its internal processors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(ByteBuf content)
(re)initializes this parser with new content.void
parse()
Instructs the parser to start parsing the current buffer.
-
-
-
Constructor Detail
-
ByteBufJsonParser
public ByteBufJsonParser(JsonPointer[] jsonPointers)
Creates a newByteBufJsonParser
and initializes all of its internal processors.- Parameters:
jsonPointers
- the pointers which should be set.
-
-
Method Detail
-
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.
-
-