Class LongJsonAdapter
- java.lang.Object
-
- org.eclipse.keyple.core.util.json.LongJsonAdapter
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<java.lang.Long>
,com.google.gson.JsonSerializer<java.lang.Long>
public class LongJsonAdapter extends java.lang.Object implements com.google.gson.JsonSerializer<java.lang.Long>, com.google.gson.JsonDeserializer<java.lang.Long>
JSON serializer/deserializer of a long to a hex string.- Since:
- 2.1.0
-
-
Constructor Summary
Constructors Constructor Description LongJsonAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Long
deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
com.google.gson.JsonElement
serialize(java.lang.Long data, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
-
-
Method Detail
-
serialize
public com.google.gson.JsonElement serialize(java.lang.Long data, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
- Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<java.lang.Long>
- Since:
- 2.1.0
-
deserialize
public java.lang.Long deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
- Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<java.lang.Long>
- Throws:
com.google.gson.JsonParseException
- Since:
- 2.1.0
-
-