public class ByteBufJsonParser extends Object
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)
ByteBufJsonParser
and initializes all of its internal processors.jsonPointers
- the pointers which should be set.public void initialize(ByteBuf content)
content
- the content used for parsing.public void parse() throws EOFException
EOFException
- if parsing fails.Copyright © 2021 Couchbase, Inc.. All rights reserved.