Class LeftOrRightContextAdapter<O>
- java.lang.Object
-
- io.ultreia.java4all.util.json.adapters.LeftOrRightContextAdapter<O>
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<LeftOrRightContext<O>>,com.google.gson.JsonSerializer<LeftOrRightContext<O>>,JsonAdapter
@AutoService(JsonAdapter.class) public class LeftOrRightContextAdapter<O> extends Object implements com.google.gson.JsonSerializer<LeftOrRightContext<O>>, com.google.gson.JsonDeserializer<LeftOrRightContext<O>>, JsonAdapter
Created at 22/04/2024.- Since:
- 1.1.17
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Constructor Summary
Constructors Constructor Description LeftOrRightContextAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LeftOrRightContext<O>deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context)com.google.gson.JsonElementserialize(LeftOrRightContext<O> src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)Class<?>type()
-
-
-
Method Detail
-
serialize
public com.google.gson.JsonElement serialize(LeftOrRightContext<O> src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
- Specified by:
serializein interfacecom.google.gson.JsonSerializer<O>
-
deserialize
public LeftOrRightContext<O> deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<O>- Throws:
com.google.gson.JsonParseException
-
type
public Class<?> type()
- Specified by:
typein interfaceJsonAdapter
-
-