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 classGsonCompatibilityMode.Builder
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]HTML_SAFE_REPLACEMENT_CHARSprivate static java.lang.String[]REPLACEMENT_CHARSprivate static intSURR1_FIRSTprivate static intSURR1_LASTprivate static intSURR2_FIRSTprivate static intSURR2_LAST
-
Constructor Summary
Constructors Modifier Constructor Description privateGsonCompatibilityMode(java.lang.String configName, GsonCompatibilityMode.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GsonCompatibilityMode.Builderbuilder()DecodercreateDecoder(java.lang.String cacheKey, java.lang.reflect.Type type)Customize type decodingEncodercreateEncoder(java.lang.String cacheKey, java.lang.reflect.Type type)Customize type encodingprotected OmitValuecreateOmitValue(java.lang.reflect.Type valueType)protected JsonIgnoregetJsonIgnore(java.lang.annotation.Annotation[] annotations)protected JsonPropertygetJsonProperty(java.lang.annotation.Annotation[] annotations)voidupdateClassDescriptor(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:
createOmitValuein classConfig
-
createEncoder
public Encoder createEncoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Description copied from interface:ExtensionCustomize type encoding- Specified by:
createEncoderin interfaceExtension- Overrides:
createEncoderin 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:ExtensionCustomize type decoding- Specified by:
createDecoderin interfaceExtension- Overrides:
createDecoderin 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:ExtensionUpdate how binding is done for the class- Specified by:
updateClassDescriptorin interfaceExtension- Overrides:
updateClassDescriptorin classConfig- Parameters:
desc- binding information
-
getJsonProperty
protected JsonProperty getJsonProperty(java.lang.annotation.Annotation[] annotations)
- Overrides:
getJsonPropertyin classConfig
-
getJsonIgnore
protected JsonIgnore getJsonIgnore(java.lang.annotation.Annotation[] annotations)
- Overrides:
getJsonIgnorein classConfig
-
-