org.jclouds.json.internal
Class NullHackJsonLiteralAdapter<L>

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

@Singleton
public abstract class NullHackJsonLiteralAdapter<L>
extends com.google.gson.TypeAdapter<L>

writes or reads the literal json directly

See Also:

Constructor Summary
NullHackJsonLiteralAdapter()
           
 
Method Summary
protected abstract  L createJsonLiteralFromRawJson(String json)
          User supplied type that holds json literally.
 L read(com.google.gson.stream.JsonReader reader)
           
 void write(com.google.gson.stream.JsonWriter jsonWriter, L value)
           
 
Methods inherited from class com.google.gson.TypeAdapter
nullSafe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullHackJsonLiteralAdapter

public NullHackJsonLiteralAdapter()
Method Detail

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 , 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


Copyright © 2009-2012 jclouds. All Rights Reserved.