public interface JSONB
JSONB binary format specification:
x90 # type_char int
x91 # binary len_int32 bytes
x92 # type [str] symbol_int32 jsonb
x93 # reference
x94 - xa3 # array_0 - array_15
xa4 # array len_int32 item*
xa5 # object_end
xa6 # object_start
xa7 # local time b0 b1 b2
xa8 # local datetime b0 b1 b2 b3 b4 b5 b6
xa9 # local date b0 b1 b2 b3
xab # timestamp millis b0 b1 b2 b3 b4 b5 b6 b7
xac # timestamp seconds b0 b1 b2 b3
xad # timestamp minutes b0 b1 b2 b3
xae # timestamp b0 b1 b2 b3 b4 b5 b6 b7 nano_int32
xaf # null
xb0 # boolean false
xb1 # boolean true
xb2 # double 0
xb3 # double 1
xb4 # double_long
xb5 # double
xb6 # float_int
xb7 # float
xb8 # decimal_long
xb9 # decimal
xba # bigint_long
xbb # bigint
xbc # short
xbd # byte
xbe # long
xbf # long encoded as 32-bit int
xc0 - xc7 # three-octet compact long (-x40000 to x3ffff)
xc8 - xd7 # two-octet compact long (-x800 to x7ff, xd0 is 0)
xd8 - xef # one-octet compact long (-x8 to xf, e0 is 0)
xf0 - xff # one-octet compact int
x00 - x2f # one-octet compact int
x30 - x3f # two-octet compact int (-x800 to x7ff)
x40 - x47 # three-octet compact int (-x40000 to x3ffff)
x48 # 32-bit signed integer ('I')
x49 - x78 # ascii string length 0-47
x79 # ascii-8 string variable-length
x7a # utf-8 string variable-length
x7b # utf-16 string variable-length
x7c # utf-16LE string variable-length
x7d # utf-16BE string variable-length
x7e # gb18030 string variable-length
x7f # symbol
Example usage:
// 1. Convert object to JSONB bytes
User user = new User(1L, "John", 30);
byte[] jsonbBytes = JSONB.toBytes(user);
// 2. Parse JSONB bytes to object
User parsedUser = JSONB.parseObject(jsonbBytes, User.class);
// 3. Convert primitive values to JSONB bytes
byte[] intBytes = JSONB.toBytes(123);
byte[] strBytes = JSONB.toBytes("Hello World");
byte[] boolBytes = JSONB.toBytes(true);
// 4. Parse JSONB bytes with features
User user = JSONB.parseObject(jsonbBytes, User.class, JSONReader.Feature.FieldBased);
// 5. Convert JSONB bytes to JSON string for debugging
String jsonString = JSONB.toJSONString(jsonbBytes);
// 6. Parse JSONB bytes to JSONObject
JSONObject jsonObject = JSONB.parseObject(jsonbBytes);
// 7. Parse JSONB bytes to JSONArray
JSONArray jsonArray = JSONB.parseArray(jsonbBytes);
// 8. Parse JSONB bytes to List
List<User> userList = JSONB.parseArray(jsonbBytes, User.class);
| Modifier and Type | Interface and Description |
|---|---|
static interface |
JSONB.Constants
Constants for JSONB binary format specification
|
static interface |
JSONB.IO
IO utility methods for JSONB serialization
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
copy(T object,
JSONWriter.Feature... features)
Creates a deep copy of the specified object
|
static void |
dump(byte[] jsonbBytes)
Dumps the JSONB bytes to standard output for debugging purposes
|
static void |
dump(byte[] jsonbBytes,
SymbolTable symbolTable)
Dumps the JSONB bytes to standard output for debugging purposes with a symbol table
|
static byte[] |
fromJSONBytes(byte[] jsonUtf8Bytes)
Converts JSON bytes to JSONB bytes
|
static byte[] |
fromJSONString(java.lang.String str)
Converts a JSON string to JSONB bytes
|
static boolean |
isInt32(int type)
Checks if the specified type is an int32 type
|
static boolean |
isInt32Byte(int type)
Checks if the specified type is an int32 byte type
|
static boolean |
isInt32ByteValue(int i)
Checks if the specified integer value can be represented as an int32 byte value
|
static boolean |
isInt32ByteValue1(int i)
Checks if the specified integer value is within the int32 byte value range
|
static boolean |
isInt32Num(int type)
Checks if the specified type is an int32 number type
|
static boolean |
isInt32Short(int type)
Checks if the specified type is an int32 short type
|
static boolean |
isInt64Byte(int type)
Checks if the specified type is an int64 byte type
|
static boolean |
isInt64Num(int type)
Checks if the specified type is an int64 number type
|
static boolean |
isInt64Short(int type)
Checks if the specified type is an int64 short type
|
static java.lang.Object |
parse(byte[] jsonbBytes,
JSONReader.Context context)
Parses JSONB bytes to an object using the specified context
|
static java.lang.Object |
parse(byte[] jsonbBytes,
JSONReader.Feature... features)
Parses JSONB bytes to an object with specified features
|
static java.lang.Object |
parse(byte[] jsonbBytes,
SymbolTable symbolTable,
JSONReader.Feature... features)
Parses JSONB bytes to an object with a symbol table and features
|
static java.lang.Object |
parse(java.io.InputStream in,
JSONReader.Context context)
Parses JSONB from an input stream to an object using the specified context
|
static JSONArray |
parseArray(byte[] jsonbBytes)
Parses JSONB bytes to a JSONArray
|
static <T> java.util.List<T> |
parseArray(byte[] jsonbBytes,
java.lang.reflect.Type... types)
Parses JSONB bytes to a list of objects with specified types
|
static <T> java.util.List<T> |
parseArray(byte[] jsonbBytes,
java.lang.reflect.Type type)
Parses JSONB bytes to a list of objects of the specified type
|
static <T> java.util.List<T> |
parseArray(byte[] jsonbBytes,
java.lang.reflect.Type[] types,
JSONReader.Feature... features)
Parses JSONB bytes to a list of objects with specified types and features
|
static <T> java.util.List<T> |
parseArray(byte[] jsonbBytes,
java.lang.reflect.Type type,
JSONReader.Feature... features)
Parses JSONB bytes to a list of objects of the specified type with features
|
static JSONArray |
parseArray(java.io.InputStream in,
JSONReader.Context context)
Parses JSONB from an input stream to a JSONArray using the specified context
|
static JSONObject |
parseObject(byte[] jsonbBytes)
Parses JSONB bytes to a JSONObject
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass)
Parses JSONB bytes to an object of the specified class
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass,
Filter filter,
JSONReader.Feature... features)
Parses JSONB bytes to an object of the specified class with a filter and features
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass,
JSONReader.Context context)
Parses JSONB bytes to an object of the specified class using the specified context
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass,
JSONReader.Feature... features)
Parses JSONB bytes to an object of the specified class with features
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass)
Parses JSONB bytes with offset and length to an object of the specified class
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass,
JSONReader.Feature... features)
Parses JSONB bytes with offset and length to an object of the specified class with features
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass,
SymbolTable symbolTable)
Parses JSONB bytes with offset and length to an object of the specified class with a symbol table
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass,
SymbolTable symbolTable,
JSONReader.Feature... features)
Parses JSONB bytes with offset and length to an object of the specified class with a symbol table and features
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type type)
Parses JSONB bytes with offset and length to an object of the specified type
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectType,
JSONReader.Context context)
Parses JSONB bytes with offset and length to an object of the specified type using the specified context
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectType,
JSONReader.Feature... features)
Parses JSONB bytes with offset and length to an object of the specified type with features
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectClass,
SymbolTable symbolTable)
Parses JSONB bytes with offset and length to an object of the specified type with a symbol table
|
static <T> T |
parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectClass,
SymbolTable symbolTable,
JSONReader.Feature... features)
Parses JSONB bytes with offset and length to an object of the specified type with a symbol table and features
|
static JSONObject |
parseObject(byte[] jsonbBytes,
JSONReader.Feature... features)
Parses JSONB bytes to a JSONObject with specified features
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.reflect.Type... types)
Parses JSONB bytes to an object with specified types
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType)
Parses JSONB bytes to an object of the specified type
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectClass,
JSONReader.Feature... features)
Parses JSONB bytes to an object of the specified type with features
|
static <T> T |
parseObject(byte[] jsonbBytes,
TypeReference typeReference,
JSONReader.Feature... features)
Parses JSONB bytes to an object of the specified type reference
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType,
SymbolTable symbolTable)
Parses JSONB bytes to an object of the specified type with a symbol table
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType,
SymbolTable symbolTable,
Filter[] filters,
JSONReader.Feature... features)
Parses JSONB bytes to an object of the specified type with a symbol table, filters and features
|
static <T> T |
parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType,
SymbolTable symbolTable,
JSONReader.Feature... features)
Parses JSONB bytes to an object of the specified type with a symbol table and features
|
static <T> T |
parseObject(java.io.InputStream in,
java.lang.Class objectClass,
JSONReader.Context context)
Parses JSONB from an input stream to an object of the specified class using the specified context
|
static <T> T |
parseObject(java.io.InputStream in,
java.lang.Class objectClass,
JSONReader.Feature... features)
Parses JSONB from an input stream to an object of the specified class
|
static <T> T |
parseObject(java.io.InputStream in,
int length,
java.lang.reflect.Type objectType,
JSONReader.Context context)
Parses JSONB from an input stream with specified length to an object of the specified type using the specified context
|
static <T> T |
parseObject(java.io.InputStream in,
int length,
java.lang.reflect.Type objectType,
JSONReader.Feature... features)
Parses JSONB from an input stream with specified length to an object of the specified type with features
|
static JSONObject |
parseObject(java.io.InputStream in,
JSONReader.Context context)
Parses JSONB bytes to a JSONObject using the specified context
|
static <T> T |
parseObject(java.io.InputStream in,
java.lang.reflect.Type objectType,
JSONReader.Context context)
Parses JSONB from an input stream to an object of the specified type using the specified context
|
static <T> T |
parseObject(java.io.InputStream in,
java.lang.reflect.Type objectType,
JSONReader.Feature... features)
Parses JSONB from an input stream to an object of the specified type
|
static SymbolTable |
symbolTable(java.lang.String... names)
Creates a symbol table with the specified names
|
static byte[] |
toBytes(boolean v)
Converts a boolean value to JSONB bytes
|
static byte[] |
toBytes(byte i)
Converts a byte value to JSONB bytes
|
static byte[] |
toBytes(int i)
Converts an integer value to JSONB bytes
|
static byte[] |
toBytes(long i)
Converts a long value to JSONB bytes
|
static byte[] |
toBytes(java.lang.Object object)
Converts an object to JSONB bytes
|
static byte[] |
toBytes(java.lang.Object object,
JSONWriter.Context context)
Converts an object to JSONB bytes with specified context
|
static byte[] |
toBytes(java.lang.Object object,
JSONWriter.Context context,
SymbolTable symbolTable,
JSONWriter.Feature... features)
Converts an object to JSONB bytes with specified context, symbol table and features
|
static byte[] |
toBytes(java.lang.Object object,
JSONWriter.Feature... features)
Converts an object to JSONB bytes with specified features
|
static byte[] |
toBytes(java.lang.Object object,
SymbolTable symbolTable)
Converts an object to JSONB bytes with a symbol table
|
static byte[] |
toBytes(java.lang.Object object,
SymbolTable symbolTable,
Filter[] filters,
JSONWriter.Feature... features)
Converts an object to JSONB bytes with a symbol table, filters and features
|
static byte[] |
toBytes(java.lang.Object object,
SymbolTable symbolTable,
JSONWriter.Feature... features)
Converts an object to JSONB bytes with a symbol table and features
|
static byte[] |
toBytes(short i)
Converts a short value to JSONB bytes
|
static byte[] |
toBytes(java.lang.String str)
Converts a string to JSONB bytes
|
static byte[] |
toBytes(java.lang.String str,
java.nio.charset.Charset charset)
Converts a string to JSONB bytes with specified charset
|
static java.lang.String |
toJSONString(byte[] jsonbBytes)
Converts JSONB bytes to a JSON string
|
static java.lang.String |
toJSONString(byte[] jsonbBytes,
boolean raw)
Converts JSONB bytes to a JSON string
|
static java.lang.String |
toJSONString(byte[] jsonbBytes,
SymbolTable symbolTable)
Converts JSONB bytes to a JSON string with a symbol table
|
static java.lang.String |
toJSONString(byte[] jsonbBytes,
SymbolTable symbolTable,
boolean raw)
Converts JSONB bytes to a JSON string with a symbol table
|
static java.lang.String |
typeName(byte type)
Gets the type name for the specified type byte
|
static int |
writeTo(java.io.OutputStream out,
java.lang.Object object,
JSONWriter.Feature... features)
Writes an object to an output stream as JSONB bytes
|
static void dump(byte[] jsonbBytes)
jsonbBytes - the JSONB bytes to dumpstatic void dump(byte[] jsonbBytes,
SymbolTable symbolTable)
jsonbBytes - the JSONB bytes to dumpsymbolTable - the symbol table to usestatic byte[] toBytes(boolean v)
v - the boolean value to convertstatic byte[] toBytes(int i)
i - the integer value to convertstatic byte[] toBytes(byte i)
i - the byte value to convertstatic byte[] toBytes(short i)
i - the short value to convertstatic byte[] toBytes(long i)
i - the long value to convertstatic java.lang.Object parse(byte[] jsonbBytes,
JSONReader.Context context)
jsonbBytes - the JSONB bytes to parsecontext - the JSON reader contextstatic java.lang.Object parse(byte[] jsonbBytes,
JSONReader.Feature... features)
jsonbBytes - the JSONB bytes to parsefeatures - the JSON reader features to applystatic java.lang.Object parse(java.io.InputStream in,
JSONReader.Context context)
in - the input stream to parse fromcontext - the JSON reader contextstatic java.lang.Object parse(byte[] jsonbBytes,
SymbolTable symbolTable,
JSONReader.Feature... features)
jsonbBytes - the JSONB bytes to parsesymbolTable - the symbol table to usefeatures - the JSON reader features to applystatic JSONObject parseObject(byte[] jsonbBytes)
jsonbBytes - the JSONB bytes to parsestatic JSONObject parseObject(byte[] jsonbBytes, JSONReader.Feature... features)
jsonbBytes - the JSONB bytes to parsefeatures - the JSON reader features to applystatic JSONObject parseObject(java.io.InputStream in, JSONReader.Context context)
in - the input stream to parse fromcontext - the JSON reader contextstatic JSONArray parseArray(byte[] jsonbBytes)
jsonbBytes - the JSONB bytes to parsestatic JSONArray parseArray(java.io.InputStream in, JSONReader.Context context)
in - the input stream to parse fromcontext - the JSON reader contextstatic <T> java.util.List<T> parseArray(byte[] jsonbBytes,
java.lang.reflect.Type type)
T - the type of objects in the listjsonbBytes - the JSONB bytes to parsetype - the type of objects in the liststatic <T> java.util.List<T> parseArray(byte[] jsonbBytes,
java.lang.reflect.Type type,
JSONReader.Feature... features)
T - the type of objects in the listjsonbBytes - the JSONB bytes to parsetype - the type of objects in the listfeatures - the JSON reader features to applystatic <T> java.util.List<T> parseArray(byte[] jsonbBytes,
java.lang.reflect.Type... types)
T - the type of objects in the listjsonbBytes - the JSONB bytes to parsetypes - the types of objects in the liststatic <T> java.util.List<T> parseArray(byte[] jsonbBytes,
java.lang.reflect.Type[] types,
JSONReader.Feature... features)
T - the type of objects in the listjsonbBytes - the JSONB bytes to parsetypes - the types of objects in the listfeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectClass - the class of the object to parse tostatic <T> T parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectType - the type of the object to parse tostatic <T> T parseObject(byte[] jsonbBytes,
java.lang.reflect.Type... types)
T - the type of the objectjsonbBytes - the JSONB bytes to parsetypes - the types of the object to parse tostatic <T> T parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType,
SymbolTable symbolTable)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectType - the type of the object to parse tosymbolTable - the symbol table to usestatic <T> T parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType,
SymbolTable symbolTable,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectType - the type of the object to parse tosymbolTable - the symbol table to usefeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass,
Filter filter,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectClass - the class of the object to parse tofilter - the filter to applyfeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectType,
SymbolTable symbolTable,
Filter[] filters,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectType - the type of the object to parse tosymbolTable - the symbol table to usefilters - the filters to applyfeatures - the JSON reader features to applystatic <T> T copy(T object,
JSONWriter.Feature... features)
T - the type of the objectobject - the object to copyfeatures - the JSON writer features to applystatic <T> T parseObject(byte[] jsonbBytes,
TypeReference typeReference,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parsetypeReference - the type reference of the object to parse tofeatures - the JSON reader features to applystatic <T> T parseObject(java.io.InputStream in,
java.lang.Class objectClass,
JSONReader.Feature... features)
throws java.io.IOException
T - the type of the objectin - the input stream to parse fromobjectClass - the class of the object to parse tofeatures - the JSON reader features to applyjava.io.IOException - if an I/O error occursstatic <T> T parseObject(java.io.InputStream in,
java.lang.reflect.Type objectType,
JSONReader.Feature... features)
throws java.io.IOException
T - the type of the objectin - the input stream to parse fromobjectType - the type of the object to parse tofeatures - the JSON reader features to applyjava.io.IOException - if an I/O error occursstatic <T> T parseObject(java.io.InputStream in,
java.lang.reflect.Type objectType,
JSONReader.Context context)
T - the type of the objectin - the input stream to parse fromobjectType - the type of the object to parse tocontext - the JSON reader contextstatic <T> T parseObject(java.io.InputStream in,
java.lang.Class objectClass,
JSONReader.Context context)
T - the type of the objectin - the input stream to parse fromobjectClass - the class of the object to parse tocontext - the JSON reader contextstatic <T> T parseObject(java.io.InputStream in,
int length,
java.lang.reflect.Type objectType,
JSONReader.Context context)
throws java.io.IOException
T - the type of the objectin - the input stream to parse fromlength - the length of data to readobjectType - the type of the object to parse tocontext - the JSON reader contextjava.io.IOException - if an I/O error occursstatic <T> T parseObject(java.io.InputStream in,
int length,
java.lang.reflect.Type objectType,
JSONReader.Feature... features)
throws java.io.IOException
T - the type of the objectin - the input stream to parse fromlength - the length of data to readobjectType - the type of the object to parse tofeatures - the JSON reader features to applyjava.io.IOException - if an I/O error occursstatic <T> T parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectClass - the class of the object to parse tofeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
java.lang.Class<T> objectClass,
JSONReader.Context context)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectClass - the class of the object to parse tocontext - the JSON reader contextstatic <T> T parseObject(byte[] jsonbBytes,
java.lang.reflect.Type objectClass,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseobjectClass - the type of the object to parse tofeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectClass - the class of the object to parse tostatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type type)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parsetype - the type of the object to parse tostatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectClass - the class of the object to parse tofeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectType,
JSONReader.Context context)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectType - the type of the object to parse tocontext - the JSON reader contextstatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectType,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectType - the type of the object to parse tofeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass,
SymbolTable symbolTable)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectClass - the class of the object to parse tosymbolTable - the symbol table to usestatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectClass,
SymbolTable symbolTable)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectClass - the type of the object to parse tosymbolTable - the symbol table to usestatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.Class<T> objectClass,
SymbolTable symbolTable,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectClass - the class of the object to parse tosymbolTable - the symbol table to usefeatures - the JSON reader features to applystatic <T> T parseObject(byte[] jsonbBytes,
int off,
int len,
java.lang.reflect.Type objectClass,
SymbolTable symbolTable,
JSONReader.Feature... features)
T - the type of the objectjsonbBytes - the JSONB bytes to parseoff - the offset in the byte arraylen - the length of data to parseobjectClass - the type of the object to parse tosymbolTable - the symbol table to usefeatures - the JSON reader features to applystatic byte[] toBytes(java.lang.String str)
str - the string to convertstatic byte[] toBytes(java.lang.String str,
java.nio.charset.Charset charset)
str - the string to convertcharset - the charset to usestatic byte[] toBytes(java.lang.Object object)
object - the object to convertstatic byte[] toBytes(java.lang.Object object,
JSONWriter.Context context)
object - the object to convertcontext - the JSON writer contextstatic byte[] toBytes(java.lang.Object object,
SymbolTable symbolTable)
object - the object to convertsymbolTable - the symbol table to usestatic byte[] toBytes(java.lang.Object object,
SymbolTable symbolTable,
JSONWriter.Feature... features)
object - the object to convertsymbolTable - the symbol table to usefeatures - the JSON writer features to applystatic byte[] toBytes(java.lang.Object object,
JSONWriter.Context context,
SymbolTable symbolTable,
JSONWriter.Feature... features)
object - the object to convertcontext - the JSON writer contextsymbolTable - the symbol table to usefeatures - the JSON writer features to applystatic byte[] toBytes(java.lang.Object object,
SymbolTable symbolTable,
Filter[] filters,
JSONWriter.Feature... features)
object - the object to convertsymbolTable - the symbol table to usefilters - the filters to applyfeatures - the JSON writer features to applystatic byte[] toBytes(java.lang.Object object,
JSONWriter.Feature... features)
object - the object to convertfeatures - the JSON writer features to applystatic SymbolTable symbolTable(java.lang.String... names)
names - the names to include in the symbol tablestatic java.lang.String toJSONString(byte[] jsonbBytes)
jsonbBytes - the JSONB bytes to convertstatic java.lang.String toJSONString(byte[] jsonbBytes,
boolean raw)
jsonbBytes - the JSONB bytes to convertraw - whether to use raw formatstatic java.lang.String toJSONString(byte[] jsonbBytes,
SymbolTable symbolTable)
jsonbBytes - the JSONB bytes to convertsymbolTable - the symbol table to usestatic java.lang.String toJSONString(byte[] jsonbBytes,
SymbolTable symbolTable,
boolean raw)
jsonbBytes - the JSONB bytes to convertsymbolTable - the symbol table to useraw - whether to use raw formatstatic int writeTo(java.io.OutputStream out,
java.lang.Object object,
JSONWriter.Feature... features)
out - the output stream to write toobject - the object to writefeatures - the JSON writer features to applystatic byte[] fromJSONString(java.lang.String str)
str - the JSON string to convertstatic byte[] fromJSONBytes(byte[] jsonUtf8Bytes)
jsonUtf8Bytes - the JSON bytes to convertstatic java.lang.String typeName(byte type)
type - the type bytestatic boolean isInt32(int type)
type - the type to checkstatic boolean isInt32Num(int type)
type - the type to checkstatic boolean isInt32Byte(int type)
type - the type to checkstatic boolean isInt32Short(int type)
type - the type to checkstatic boolean isInt64Num(int type)
type - the type to checkstatic boolean isInt64Byte(int type)
type - the type to checkstatic boolean isInt64Short(int type)
type - the type to checkstatic boolean isInt32ByteValue(int i)
i - the integer value to checkstatic boolean isInt32ByteValue1(int i)
i - the integer value to check