Class NodeGraphJsonAdapter
java.lang.Object
com.marginallyclever.nodegraphcore.json.NodeGraphJsonAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<NodeGraph>,com.google.gson.JsonSerializer<NodeGraph>
public class NodeGraphJsonAdapter extends java.lang.Object implements com.google.gson.JsonSerializer<NodeGraph>, com.google.gson.JsonDeserializer<NodeGraph>
- Since:
- 2022-02-23
-
Field Summary
Fields Modifier and Type Field Description static java.lang.reflect.TypenodeTypeNeeded by Gson. -
Constructor Summary
Constructors Constructor Description NodeGraphJsonAdapter() -
Method Summary
Modifier and Type Method Description NodeGraphdeserialize(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext context)com.google.gson.JsonElementserialize(NodeGraph graph, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext context)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
nodeType
public static final java.lang.reflect.Type nodeTypeNeeded by Gson.
-
-
Constructor Details
-
NodeGraphJsonAdapter
public NodeGraphJsonAdapter()
-
-
Method Details
-
serialize
public com.google.gson.JsonElement serialize(NodeGraph graph, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext context)- Specified by:
serializein interfacecom.google.gson.JsonSerializer<NodeGraph>
-
deserialize
public NodeGraph deserialize(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<NodeGraph>- Throws:
com.google.gson.JsonParseException
-