- All Superinterfaces:
- JsonReader.Factory
- Enclosing class:
- JsonReader
public static interface JsonReader.ClassFactoryEx
extends JsonReader.Factory
Subclass this interface and create a class that will return a new instance of the
passed in Class (c). Your subclass will be called when json-io encounters an
the new to instantiate an instance of (c). The 'args' Map passed in will
contain a 'jsonObj' key that holds the JsonObject (Map) representing the
object being converted. If you need values from the fields of this object
in order to instantiate your class, you can grab them from the JsonObject (Map).
Make json-io aware that it needs to call your class by calling the public
JsonReader.assignInstantiator() API.