Class JsonIterator
java.lang.Object
com.jsoniter.JsonIterator
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()final Stringstatic final Anydeserialize(byte[] input) static final <T> Tdeserialize(byte[] input, TypeLiteral<T> typeLiteral) static final <T> Tdeserialize(byte[] input, Class<T> clazz) static final Anydeserialize(Config config, byte[] input) static final <T> Tdeserialize(Config config, byte[] input, TypeLiteral<T> typeLiteral) static final <T> Tdeserialize(Config config, byte[] input, Class<T> clazz) static final Anydeserialize(Config config, String input) static final <T> Tdeserialize(Config config, String input, TypeLiteral<T> typeLiteral) static final <T> Tdeserialize(Config config, String input, Class<T> clazz) static final Anydeserialize(String input) static final <T> Tdeserialize(String input, TypeLiteral<T> typeLiteral) static final <T> Tdeserialize(String input, Class<T> clazz) static voidstatic JsonIteratorparse(byte[] buf) static JsonIteratorparse(byte[] buf, int head, int tail) static JsonIteratorstatic JsonIteratorparse(InputStream in, int bufSize) static JsonIteratorfinal Objectread()final <T> Tread(TypeLiteral<T> typeLiteral) final <T> Tread(TypeLiteral<T> typeLiteral, T existingObject) try to bind to existing object, returned object might not the same instancefinal <T> Tfinal Objectfinal <T> Tread(T existingObject) try to bind to existing object, returned object might not the same instancefinal AnyreadAny()final booleanfinal booleanreadArrayCB(JsonIterator.ReadArrayCallback callback, Object attachment) final BigDecimalfinal BigIntegerfinal booleanfinal doublefinal floatfinal intreadInt()final longreadLong()final booleanreadNull()final Stringfinal voidreadObjectCB(JsonIterator.ReadObjectCallback cb, Object attachment) final shortfinal Stringfinal Slicefinal JsonExceptionreportError(String op, String msg) final voidreset(byte[] buf) final voidreset(byte[] buf, int head, int tail) final voidfinal voidreset(InputStream in) static voidsetMode(DecodingMode mode) voidskip()
-
Field Details
-
configCache
-
-
Constructor Details
-
JsonIterator
public JsonIterator()
-
-
Method Details
-
parse
-
parse
-
parse
-
parse
-
parse
-
reset
public final void reset(byte[] buf) -
reset
public final void reset(byte[] buf, int head, int tail) -
reset
-
reset
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
reportError
-
currentBuffer
-
readNull
- Throws:
IOException
-
readBoolean
- Throws:
IOException
-
readShort
- Throws:
IOException
-
readInt
- Throws:
IOException
-
readLong
- Throws:
IOException
-
readArray
- Throws:
IOException
-
readNumberAsString
- Throws:
IOException
-
readArrayCB
public final boolean readArrayCB(JsonIterator.ReadArrayCallback callback, Object attachment) throws IOException - Throws:
IOException
-
readString
- Throws:
IOException
-
readStringAsSlice
- Throws:
IOException
-
readObject
- Throws:
IOException
-
readObjectCB
public final void readObjectCB(JsonIterator.ReadObjectCallback cb, Object attachment) throws IOException - Throws:
IOException
-
readFloat
- Throws:
IOException
-
readDouble
- Throws:
IOException
-
readBigDecimal
- Throws:
IOException
-
readBigInteger
- Throws:
IOException
-
readAny
- Throws:
IOException
-
read
- Throws:
IOException
-
read
try to bind to existing object, returned object might not the same instance- Type Parameters:
T- object type- Parameters:
existingObject- the object instance to reuse- Returns:
- data binding result, might not be the same object
- Throws:
IOException- if I/O went wrong
-
read
try to bind to existing object, returned object might not the same instance- Type Parameters:
T- object type- Parameters:
typeLiteral- the type objectexistingObject- the object instance to reuse- Returns:
- data binding result, might not be the same object
- Throws:
IOException- if I/O went wrong
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
whatIsNext
- Throws:
IOException
-
skip
- Throws:
IOException
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
deserialize
-
setMode
-
enableStreamingSupport
public static void enableStreamingSupport()
-