Module de.ralleytn.simple.json
Annotation Type JSONAttribute
Marks a JSON attribute for serialization.
- Since:
- 1.0.0
- Version:
- 2.1.0
- Author:
- Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents the type of an attribute. -
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass<?>
Defines theJSONAttribute.Type.GETTER
is used for serializing an object.
-
Element Details
-
name
String name- Returns:
- the name of the attribute
- Since:
- 1.0.0
-
-
-
type
JSONAttribute.Type[] typeJSONAttribute.Type.GETTER
is used for serializing an object. If it is used on a method, it is not allowed to have any parameters!JSONAttribute.Type.SETTER
is used for deserializing an object. If it is used on a method, it can only have one parameter! If this Annotation is used on a field, it has to be accessible!- Returns:
- the attribute type
- Since:
- 1.0.0
- Default:
- {GETTER, SETTER}
-
genericType
Class<?> genericTypeDefines the- Returns:
- the generic type for the values within the attribute for correct mapping during deserialization.
- Since:
- 2.1.0
- Default:
- void.class
-