Package com.blackrook.json.annotation
Annotation Interface JSONCollectionType
Provides a hint to the default deserializer that the generic type for
a collection takes a specific single type (Lists, Sets).
Java's Generics are not reified as class data, and cannot be queried via reflection, hence why this hint exists.
If the type to deserialize to is an interface or abstract class, the following implementations are used for the underlying collection type (searched in this order):
- List<T> - ArrayList<T>
- SortedSet<T> - TreeSet<T>
- Set<T> - HashSet<T>
- Iterable<T> - ArrayList<T>
- Collection<T> - ArrayList<T>
JSONConversionException
will occur.- Since:
- 1.1.0
-
Optional Element Summary
-
Element Details
-
value
Class<?> value- Returns:
- the Generic type for the collection.
- Default:
- com.blackrook.json.JSONObject.class
-