Package com.jsoniter.extra
Class GsonCompatibilityMode
- java.lang.Object
-
- com.jsoniter.spi.EmptyExtension
-
- com.jsoniter.spi.Config
-
- com.jsoniter.extra.GsonCompatibilityMode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GsonCompatibilityMode.Builder
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]
HTML_SAFE_REPLACEMENT_CHARS
private static java.lang.String[]
REPLACEMENT_CHARS
private static int
SURR1_FIRST
private static int
SURR1_LAST
private static int
SURR2_FIRST
private static int
SURR2_LAST
-
Constructor Summary
Constructors Modifier Constructor Description private
GsonCompatibilityMode(java.lang.String configName, GsonCompatibilityMode.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GsonCompatibilityMode.Builder
builder()
Decoder
createDecoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Customize type decodingEncoder
createEncoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Customize type encodingprotected OmitValue
createOmitValue(java.lang.reflect.Type valueType)
protected JsonIgnore
getJsonIgnore(java.lang.annotation.Annotation[] annotations)
protected JsonProperty
getJsonProperty(java.lang.annotation.Annotation[] annotations)
void
updateClassDescriptor(ClassDescriptor desc)
Update how binding is done for the class-
Methods inherited from class com.jsoniter.spi.Config
configName, copyBuilder, decodingMode, encodingMode, escapeUnicode, getAnnotation, getDecoderCacheKey, getEncoderCacheKey, getJsonCreator, getJsonUnwrapper, getJsonWrapper, indentionStep, omitDefaultValue
-
Methods inherited from class com.jsoniter.spi.EmptyExtension
canCreate, chooseImplementation, create
-
-
-
-
Field Detail
-
SURR1_FIRST
private static final int SURR1_FIRST
- See Also:
- Constant Field Values
-
SURR1_LAST
private static final int SURR1_LAST
- See Also:
- Constant Field Values
-
SURR2_FIRST
private static final int SURR2_FIRST
- See Also:
- Constant Field Values
-
SURR2_LAST
private static final int SURR2_LAST
- See Also:
- Constant Field Values
-
REPLACEMENT_CHARS
private static final java.lang.String[] REPLACEMENT_CHARS
-
HTML_SAFE_REPLACEMENT_CHARS
private static final java.lang.String[] HTML_SAFE_REPLACEMENT_CHARS
-
-
Constructor Detail
-
GsonCompatibilityMode
private GsonCompatibilityMode(java.lang.String configName, GsonCompatibilityMode.Builder builder)
-
-
Method Detail
-
builder
protected GsonCompatibilityMode.Builder builder()
-
createOmitValue
protected OmitValue createOmitValue(java.lang.reflect.Type valueType)
- Overrides:
createOmitValue
in classConfig
-
createEncoder
public Encoder createEncoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Description copied from interface:Extension
Customize type encoding- Specified by:
createEncoder
in interfaceExtension
- Overrides:
createEncoder
in classEmptyExtension
- Parameters:
cacheKey
- name of the encodertype
- change how to encode the type- Returns:
- null, if not special customization needed
-
createDecoder
public Decoder createDecoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Description copied from interface:Extension
Customize type decoding- Specified by:
createDecoder
in interfaceExtension
- Overrides:
createDecoder
in classEmptyExtension
- Parameters:
cacheKey
- name of the decodertype
- change how to decode the type- Returns:
- null, if no special customization needed
-
updateClassDescriptor
public void updateClassDescriptor(ClassDescriptor desc)
Description copied from interface:Extension
Update how binding is done for the class- Specified by:
updateClassDescriptor
in interfaceExtension
- Overrides:
updateClassDescriptor
in classConfig
- Parameters:
desc
- binding information
-
getJsonProperty
protected JsonProperty getJsonProperty(java.lang.annotation.Annotation[] annotations)
- Overrides:
getJsonProperty
in classConfig
-
getJsonIgnore
protected JsonIgnore getJsonIgnore(java.lang.annotation.Annotation[] annotations)
- Overrides:
getJsonIgnore
in classConfig
-
-