public <T> T fromJson(Reader paramReader, Class<T> paramClass) throws JsonSyntaxException, JsonIOException { paramReader = new JsonReader(paramReader); Object localObject = fromJson(paramReader, paramClass); assertFullConsumption(localObject, paramReader); return Primitives.wrap(paramClass).cast(localObject); }
public <T> T fromXml(final Reader json, final Class<T> classOfT) throws JsonSyntaxException, JsonIOException { final XmlReader jsonReader = new XmlReader(json, xmlParserCreator, options); // change reader final Object object = fromXml(jsonReader, classOfT); assertFullConsumption(object, jsonReader); return Primitives.wrap(classOfT).cast(object); }
public <T> T fromJson(JsonElement jsonElement, Class<T> cls) throws JsonSyntaxException { return Primitives.wrap(cls).cast(fromJson(jsonElement, (Type) cls)); }
public <T> T fromJson(Reader reader, Class<T> cls) throws JsonSyntaxException, JsonIOException { JsonReader jsonReader = new JsonReader(reader); Object fromJson = fromJson(jsonReader, (Type) cls); assertFullConsumption(fromJson, jsonReader); return Primitives.wrap(cls).cast(fromJson); }
public <T> T fromJson(String str, Class<T> cls) throws JsonSyntaxException { return Primitives.wrap(cls).cast(fromJson(str, (Type) cls)); }
public <T> T fromJson(String paramString, Class<T> paramClass) throws JsonSyntaxException { paramString = fromJson(paramString, paramClass); return Primitives.wrap(paramClass).cast(paramString); }
public <T> T fromJson(JsonElement paramJsonElement, Class<T> paramClass) throws JsonSyntaxException { paramJsonElement = fromJson(paramJsonElement, paramClass); return Primitives.wrap(paramClass).cast(paramJsonElement); }
public <T> T fromXml(final String json, final Class<T> classOfT) throws JsonSyntaxException { final Object object = fromXml(json, (Type) classOfT); return Primitives.wrap(classOfT).cast(object); }