public class JsonIterator extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static interface |
JsonIterator.ReadArrayCallback |
static interface |
JsonIterator.ReadObjectCallback |
| Modifier and Type | Field and Description |
|---|---|
Config |
configCache |
| Constructor and Description |
|---|
JsonIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
currentBuffer() |
static Any |
deserialize(byte[] input) |
static <T> T |
deserialize(byte[] input,
Class<T> clazz) |
static <T> T |
deserialize(byte[] input,
TypeLiteral<T> typeLiteral) |
static Any |
deserialize(Config config,
byte[] input) |
static <T> T |
deserialize(Config config,
byte[] input,
Class<T> clazz) |
static <T> T |
deserialize(Config config,
byte[] input,
TypeLiteral<T> typeLiteral) |
static Any |
deserialize(Config config,
String input) |
static <T> T |
deserialize(Config config,
String input,
Class<T> clazz) |
static <T> T |
deserialize(Config config,
String input,
TypeLiteral<T> typeLiteral) |
static Any |
deserialize(String input) |
static <T> T |
deserialize(String input,
Class<T> clazz) |
static <T> T |
deserialize(String input,
TypeLiteral<T> typeLiteral) |
static void |
enableStreamingSupport() |
static JsonIterator |
parse(byte[] buf) |
static JsonIterator |
parse(byte[] buf,
int head,
int tail) |
static JsonIterator |
parse(InputStream in,
int bufSize) |
static JsonIterator |
parse(Slice slice) |
static JsonIterator |
parse(String str) |
Object |
read() |
<T> T |
read(Class<T> clazz) |
<T> T |
read(T existingObject)
try to bind to existing object, returned object might not the same instance
|
Object |
read(Type type) |
<T> T |
read(TypeLiteral<T> typeLiteral) |
<T> T |
read(TypeLiteral<T> typeLiteral,
T existingObject)
try to bind to existing object, returned object might not the same instance
|
Any |
readAny() |
boolean |
readArray() |
boolean |
readArrayCB(JsonIterator.ReadArrayCallback callback,
Object attachment) |
BigDecimal |
readBigDecimal() |
BigInteger |
readBigInteger() |
boolean |
readBoolean() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
long |
readLong() |
boolean |
readNull() |
String |
readNumberAsString() |
String |
readObject() |
void |
readObjectCB(JsonIterator.ReadObjectCallback cb,
Object attachment) |
short |
readShort() |
String |
readString() |
Slice |
readStringAsSlice() |
JsonException |
reportError(String op,
String msg) |
void |
reset(byte[] buf) |
void |
reset(byte[] buf,
int head,
int tail) |
void |
reset(InputStream in) |
void |
reset(Slice value) |
static void |
setMode(DecodingMode mode) |
void |
skip() |
ValueType |
whatIsNext() |
public Config configCache
public static JsonIterator parse(InputStream in, int bufSize)
public static JsonIterator parse(byte[] buf)
public static JsonIterator parse(byte[] buf, int head, int tail)
public static JsonIterator parse(String str)
public static JsonIterator parse(Slice slice)
public final void reset(byte[] buf)
public final void reset(byte[] buf,
int head,
int tail)
public final void reset(Slice value)
public final void reset(InputStream in)
public final void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic final JsonException reportError(String op, String msg)
public final String currentBuffer()
public final boolean readNull()
throws IOException
IOExceptionpublic final boolean readBoolean()
throws IOException
IOExceptionpublic final short readShort()
throws IOException
IOExceptionpublic final int readInt()
throws IOException
IOExceptionpublic final long readLong()
throws IOException
IOExceptionpublic final boolean readArray()
throws IOException
IOExceptionpublic String readNumberAsString() throws IOException
IOExceptionpublic final boolean readArrayCB(JsonIterator.ReadArrayCallback callback, Object attachment) throws IOException
IOExceptionpublic final String readString() throws IOException
IOExceptionpublic final Slice readStringAsSlice() throws IOException
IOExceptionpublic final String readObject() throws IOException
IOExceptionpublic final void readObjectCB(JsonIterator.ReadObjectCallback cb, Object attachment) throws IOException
IOExceptionpublic final float readFloat()
throws IOException
IOExceptionpublic final double readDouble()
throws IOException
IOExceptionpublic final BigDecimal readBigDecimal() throws IOException
IOExceptionpublic final BigInteger readBigInteger() throws IOException
IOExceptionpublic final Any readAny() throws IOException
IOExceptionpublic final Object read() throws IOException
IOExceptionpublic final <T> T read(T existingObject)
throws IOException
T - object typeexistingObject - the object instance to reuseIOException - if I/O went wrongpublic final <T> T read(TypeLiteral<T> typeLiteral, T existingObject) throws IOException
T - object typetypeLiteral - the type objectexistingObject - the object instance to reuseIOException - if I/O went wrongpublic final <T> T read(Class<T> clazz) throws IOException
IOExceptionpublic final <T> T read(TypeLiteral<T> typeLiteral) throws IOException
IOExceptionpublic final Object read(Type type) throws IOException
IOExceptionpublic ValueType whatIsNext() throws IOException
IOExceptionpublic void skip()
throws IOException
IOExceptionpublic static final <T> T deserialize(Config config, String input, TypeLiteral<T> typeLiteral)
public static final <T> T deserialize(String input, TypeLiteral<T> typeLiteral)
public static final <T> T deserialize(byte[] input,
Class<T> clazz)
public static final <T> T deserialize(Config config, byte[] input, TypeLiteral<T> typeLiteral)
public static final <T> T deserialize(byte[] input,
TypeLiteral<T> typeLiteral)
public static final Any deserialize(byte[] input)
public static void setMode(DecodingMode mode)
public static void enableStreamingSupport()
Copyright © 2019. All rights reserved.