public class GeneralObjectDeserializer extends Object implements com.google.gson.JsonDeserializer<Object>
Modifier and Type | Field and Description |
---|---|
static com.google.gson.Gson |
generalGson
generalGson is a Gson instance which provides
for general deserializing. |
Constructor and Description |
---|
GeneralObjectDeserializer() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
static Object |
fromJson(Reader json)
This is a convenience routine deserializes the Json read from the
specified reader into one of the five general Java types as
described above.
|
static Object |
fromJson(String json)
This is a convenience routine which deserializes a
string into one of the five general Java types as
described above.
|
public static final com.google.gson.Gson generalGson
generalGson
is a Gson instance which provides
for general deserializing.public static Object fromJson(String json) throws com.google.gson.JsonParseException
json
- the json string to be deserializedcom.google.gson.JsonParseException
- if json is not a valid representation
for an object of typeGson.fromJson(String, Class)
public static Object fromJson(Reader json) throws com.google.gson.JsonParseException
json
- the reader producing the Json from which the object is
to be deserialized.com.google.gson.JsonParseException
- if json is not a valid representation
for an object of typeGson.fromJson(Reader , Class)
public Object deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize
in interface com.google.gson.JsonDeserializer<Object>
com.google.gson.JsonParseException
Copyright © 2010–2015. All rights reserved.