Annotation Type JSONValueConverter
@Documented @Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface JSONValueConverter
Specifies a
ValueConverter
to be applied to a JSONValue before setting the value on the target class.
These can be used for situations where underlying Class does not have a default, zero-parameter constructor, for
converting a primitive value to a specific class (e.g., a Long JSON value to a LocalDate or LocalDateTime), or
for formatting values from JSON before setting them in the target class (e.g., formatting a double with commas and
decimal places)- Author:
- Jim Earley (xml.jim@gmail.com)
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends ValueConverter<?>>
converter
Sets the ValueConverter class to be applied to the JSONValue -
Optional Element Summary
-
Element Details
-
converter
Class<? extends ValueConverter<?>> converterSets the ValueConverter class to be applied to the JSONValue- Returns:
-
-
-
args
String[] args- Default:
- {}
-