Package org.jclouds.json.internal
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNullHackJsonLiteralAdapter.NullReplacingWriter
-
Constructor Summary
Constructors Constructor Description NullHackJsonLiteralAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract LcreateJsonLiteralFromRawJson(String json)User supplied type that holds json literally.protected WritergetWriter(com.google.gson.stream.JsonWriter arg0)Lread(com.google.gson.stream.JsonReader reader)protected StringtoString(L value)voidwrite(com.google.gson.stream.JsonWriter jsonWriter, L value)
-
-
-
Method Detail
-
read
public L read(com.google.gson.stream.JsonReader reader) throws IOException
- Specified by:
readin classcom.google.gson.TypeAdapter<L>- Throws:
IOException
-
createJsonLiteralFromRawJson
protected abstract L createJsonLiteralFromRawJson(String json)
User supplied type that holds json literally. Ex. number as8, boolean astrue, string as"value", object as {@code , list {@code []}.
-
write
public void write(com.google.gson.stream.JsonWriter jsonWriter, L value) throws IOException- Specified by:
writein classcom.google.gson.TypeAdapter<L>- Throws:
IOException
-
getWriter
protected Writer getWriter(com.google.gson.stream.JsonWriter arg0)
-
-