Class JsonStringAdapter

  • All Implemented Interfaces:
    dev.drtheo.autojson.SchemaHolder , dev.drtheo.autojson.adapter.JsonAdapter , dev.drtheo.autojson.adapter.JsonContext

    
    public class JsonStringAdapter
     implements JsonAdapter<From, To>
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T> String toJson(T obj, Type type)
      <R> R fromJson(String object, Type clazz)
      AutoJSON auto()
      • Methods inherited from class dev.drtheo.autojson.adapter.JsonAdapter

        fromJson, toJson
      • Methods inherited from class dev.drtheo.autojson.adapter.JsonContext

        schema, schemaHolder
      • Methods inherited from class dev.drtheo.autojson.SchemaHolder

        schema
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonStringAdapter

        JsonStringAdapter(AutoJSON auto)
    • Method Detail

      • toJson

         <T> String toJson(T obj, Type type)
        Parameters:
        obj - the object to serialize.
        type - the type to serialize via.
        Returns:

        the serialized object.

      • fromJson

         <R> R fromJson(String object, Type clazz)
        Parameters:
        object - the object to deserialize.
        Returns:

        The deserialized object.