Class ByteBufJsonParser
java.lang.Object
com.couchbase.client.core.utils.yasjl.ByteBufJsonParser
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 Summary
ConstructorDescriptionByteBufJsonParser
(JsonPointer[] jsonPointers) Creates a newByteBufJsonParser
and initializes all of its internal processors. -
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(ByteBuf content) (re)initializes this parser with new content.void
parse()
Instructs the parser to start parsing the current buffer.
-
Constructor Details
-
ByteBufJsonParser
Creates a newByteBufJsonParser
and initializes all of its internal processors.- Parameters:
jsonPointers
- the pointers which should be set.
-
-
Method Details
-
initialize
(re)initializes this parser with new content.- Parameters:
content
- the content used for parsing.
-
parse
Instructs the parser to start parsing the current buffer.- Throws:
EOFException
- if parsing fails.
-