public final class TypeCodes extends Object
Type and the code used to prefix
its json serialisation.| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
static String |
decodeName(int split,
String jsonString)
Decode the property name encoded into a
jsonString given its split. |
static int |
decodeType(int split,
String jsonString)
Decode the type encoded into
jsonString given its split. |
static String |
encode(int propertyType,
String propertyName)
Encodes the given
propertyName of the given propertyType into
a json string, which is prefixed with a type code. |
static int |
split(String jsonString)
Splits a
jsonString, which is prefixed with a type code
at the location where the prefix ends. |
public static final String EMPTY_ARRAY
public static String encode(int propertyType, String propertyName)
propertyName of the given propertyType into
a json string, which is prefixed with a type code.propertyType - type of the propertypropertyName - name of the propertypublic static int split(String jsonString)
jsonString, which is prefixed with a type code
at the location where the prefix ends.jsonString - json string to splitpublic static int decodeType(int split,
String jsonString)
jsonString given its split.split - split of the json stringjsonString - json stringPropertyType.UNDEFINED if none or split is not within jsonString.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.