Package io.jmix.dashboards.converter
Class InheritanceAdapter
java.lang.Object
io.jmix.dashboards.converter.InheritanceAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer
,com.google.gson.JsonSerializer
public class InheritanceAdapter
extends Object
implements com.google.gson.JsonSerializer, com.google.gson.JsonDeserializer
Supports JSON serialization/deserialization for inherited classes
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) protected Class
getObjectClass
(String className) com.google.gson.JsonElement
-
Field Details
-
CLASSNAME
- See Also:
-
DATA
- See Also:
-
-
Constructor Details
-
InheritanceAdapter
public InheritanceAdapter()
-
-
Method Details
-
deserialize
public Object deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException - Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer
- Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(Object src, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer
-
getObjectClass
-