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!
Constructor and Description |
---|
ByteBufJsonParser(JsonPointer[] jsonPointers)
Creates a new
ByteBufJsonParser and initializes all of its internal processors. |
Modifier and Type | Method and Description |
---|---|
void |
initialize(ByteBuf content)
(re)initializes this parser with new content.
|
void |
parse()
Instructs the parser to start parsing the current buffer.
|
public ByteBufJsonParser(JsonPointer[] jsonPointers)
Creates a new ByteBufJsonParser
and initializes all of its internal processors.
jsonPointers
- the pointers which should be set.public void initialize(ByteBuf content)
(re)initializes this parser with new content.
content
- the content used for parsing.public void parse() throws EOFException
Instructs the parser to start parsing the current buffer.
EOFException
- if parsing fails.Copyright © 2017 Couchbase, Inc.. All rights reserved.