public final class TypeCodes
extends java.lang.Object
Type and the code used to prefix
its json serialisation.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EMPTY_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
decodeName(int split,
java.lang.String jsonString)
Decode the property name encoded into a
jsonString given its split. |
static int |
decodeType(int split,
java.lang.String jsonString)
Decode the type encoded into
jsonString given its split. |
static java.lang.String |
encode(int propertyType,
java.lang.String propertyName)
Encodes the given
propertyName of the given propertyType into
a json string, which is prefixed with a type code. |
static int |
split(java.lang.String jsonString)
Splits a
jsonString, which is prefixed with a type code
at the location where the prefix ends. |
public static final java.lang.String EMPTY_ARRAY
public static java.lang.String encode(int propertyType,
java.lang.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(java.lang.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,
java.lang.String jsonString)
jsonString given its split.split - split of the json stringjsonString - json stringPropertyType.UNDEFINED if none or split is not within jsonString.public static java.lang.String decodeName(int split,
java.lang.String jsonString)
jsonString given its split.split - split of the json stringjsonString - json stringjsonString if split is not with jsonString.Copyright © 2010 - 2023 Adobe. All Rights Reserved