Class NullHackJsonLiteralAdapter<L>

java.lang.Object
com.google.gson.TypeAdapter<L>
org.jclouds.json.internal.NullHackJsonLiteralAdapter<L>
Direct Known Subclasses:
ChefParserModule.DataBagItemAdapter, GsonModule.NullHackJsonBallAdapter

public abstract class NullHackJsonLiteralAdapter<L> extends com.google.gson.TypeAdapter<L>
writes or reads the literal json directly
See Also:
  • Constructor Details

    • NullHackJsonLiteralAdapter

      public NullHackJsonLiteralAdapter()
  • Method Details

    • read

      public L read(com.google.gson.stream.JsonReader reader) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<L>
      Throws:
      IOException
    • createJsonLiteralFromRawJson

      protected abstract L createJsonLiteralFromRawJson(String json)
      User supplied type that holds json literally. Ex. number as 8, boolean as true , string as "value", object as
      invalid @code
      {@code , list {@code []}.
    • write

      public void write(com.google.gson.stream.JsonWriter jsonWriter, L value) throws IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<L>
      Throws:
      IOException
    • toString

      protected String toString(L value)
    • getWriter

      protected Writer getWriter(com.google.gson.stream.JsonWriter arg0)