Interface GraphQLJsonSerializer

All Known Implementing Classes:
JacksonGraphQLJsonSerializer

public interface GraphQLJsonSerializer
An interface for serializing and deserializing GraphQL objects.
Since:
1.0
Author:
Marcel Overdijk
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    deserialize(String json, Class<T> requiredType)
    Deserializes the given json String to an object of the required type.
    serialize(Object object)
    Serializes the given object to a json String.
  • Method Details

    • serialize

      String serialize(Object object)
      Serializes the given object to a json String.
      Parameters:
      object - the object to serialize
      Returns:
      the json string
    • deserialize

      <T> T deserialize(String json, Class<T> requiredType)
      Deserializes the given json String to an object of the required type.
      Type Parameters:
      T - the required generic type
      Parameters:
      json - the json string
      requiredType - the required type
      Returns:
      the object