Package graphql.spring.web.servlet
Interface JsonSerializer
-
- All Known Implementing Classes:
JacksonJsonSerializer
@PublicSpi public interface JsonSerializerAn interface for serializing and deserializing GraphQL objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Tdeserialize(java.lang.String json, java.lang.Class<T> requiredType)Deserializes the given jsonStringto an object of the required type.java.lang.Stringserialize(java.lang.Object object)Serializes the given object to a jsonString.
-
-
-
Method Detail
-
serialize
java.lang.String serialize(java.lang.Object object)
Serializes the given object to a jsonString.- Parameters:
object- the object to serialize- Returns:
- the json string
-
deserialize
<T> T deserialize(java.lang.String json, java.lang.Class<T> requiredType)Deserializes the given jsonStringto an object of the required type.- Type Parameters:
T- the required generic type- Parameters:
json- the json stringrequiredType- the required type- Returns:
- the object
-
-