Package com.dslplatform.json
Annotation Type 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.time.Instant is not a supported type. After creating class such as
@JsonConverter(target=Instant.class)
public abstract InstantConverter {
public static Instant read(JsonReader reader) { ... }
public static void write(JsonWriter writer, Instant value) { ... }
public static Instant default() { ... }
}
Date type will be one of the supported types.-
Required Element Summary
Required Elements
-
Element Details
-
target
Class targetFor which class this converter applies.- Returns:
- target type
-