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 class
NullHackJsonLiteralAdapter.NullReplacingWriter
-
Constructor Summary
Constructors Constructor Description NullHackJsonLiteralAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract L
createJsonLiteralFromRawJson(String json)
User supplied type that holds json literally.protected Writer
getWriter(com.google.gson.stream.JsonWriter arg0)
L
read(com.google.gson.stream.JsonReader reader)
protected String
toString(L value)
void
write(com.google.gson.stream.JsonWriter jsonWriter, L value)
-
-
-
Method Detail
-
read
public L read(com.google.gson.stream.JsonReader reader) throws IOException
- Specified by:
read
in 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:
write
in classcom.google.gson.TypeAdapter<L>
- Throws:
IOException
-
getWriter
protected Writer getWriter(com.google.gson.stream.JsonWriter arg0)
-
-