Class NodeJsonAdapter
java.lang.Object
com.marginallyclever.nodegraphcore.json.NodeJsonAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<Node>
,com.google.gson.JsonSerializer<Node>
public class NodeJsonAdapter extends java.lang.Object implements com.google.gson.JsonSerializer<Node>, com.google.gson.JsonDeserializer<Node>
- Since:
- 2022-02-23
-
Constructor Summary
Constructors Constructor Description NodeJsonAdapter()
-
Method Summary
Modifier and Type Method Description Node
deserialize(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext context)
com.google.gson.JsonElement
serialize(Node node, 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
-
Constructor Details
-
NodeJsonAdapter
public NodeJsonAdapter()
-
-
Method Details
-
serialize
public com.google.gson.JsonElement serialize(Node node, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext context)- Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<Node>
-
deserialize
public Node deserialize(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException- Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<Node>
- Throws:
com.google.gson.JsonParseException
-