com.dslplatform.json
Annotation Type JsonConverter


@Target(value=TYPE)
@Retention(value=CLASS)
public @interface JsonConverter

JSON converter can be specified for class. It must have JSON_READER and JSON_WRITER which do the JSON conversion. This can be used for fine tuning the serialization/deserialization process. Eg. java.util.Date is not a supported type. After creating class such as

     @JsonConverter(target=Date.class)
     public abstract DateConverter {
         public static JsonReader.ReadObject<Date> JSON_READER = ...
         public static JsonWriter.WriteObject<Date> JSON_WRITER = ...
     }
 
Date type will be one of the supported types.


Required Element Summary
 Class target
          For which class this converter applies.
 

Element Detail

target

public abstract Class target
For which class this converter applies.

Returns:
target type


Copyright © 2017. All rights reserved.