List of usage examples for com.google.gson JsonDeserializer interface-usage
From source file com.indragie.cmput301as1.DateJSONDeserializer.java
/** * Deserializes {@link Date} objects from JSON. */ public class DateJSONDeserializer implements JsonDeserializer<Date> { /* (non-Javadoc)
From source file com.indragie.cmput301as1.ExpenseItemJSONDeserializer.java
/** * Deserializes an {@link ExpenseItem} from JSON. */ public class ExpenseItemJSONDeserializer implements JsonDeserializer<ExpenseItem> { /** * Controller used to generate receipt URIs.
From source file com.itametis.jsonconverter.pathstrategy.PathDeserializer.java
/**
* Improved Deserialisation to change the structure of the Json before converting it into an object.
*
* Gson converts a String into a Json Tree. Each leaf is a JsonElement.
* A JsonElement (abstract type) can be :
* - A jsonObject : An Object as represented in the java World. This class would be represented as a JsonObject.
From source file com.jaspervanriet.huntingthatproduct.Utils.CollectionDeserializer.java
public class CollectionDeserializer implements JsonDeserializer<Collection> { @Override public Collection deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { JsonElement collection = json.getAsJsonObject().get("collection");
From source file com.javacreed.examples.gson.part1.BookDeserializer.java
public class BookDeserializer implements JsonDeserializer<Book> { @Override public Book deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) throws JsonParseException { final JsonObject jsonObject = json.getAsJsonObject();
From source file com.javacreed.examples.gson.part2.AuthorDeserializer.java
public class AuthorDeserializer implements JsonDeserializer<Author> { @Override public Author deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) throws JsonParseException { final JsonObject jsonObject = json.getAsJsonObject();
From source file com.javacreed.examples.gson.part2.BookDeserializer.java
public class BookDeserializer implements JsonDeserializer<Book> { @Override public Book deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) throws JsonParseException { final JsonObject jsonObject = json.getAsJsonObject();
From source file com.javacreed.examples.gson.part3.AuthorDeserializer.java
public class AuthorDeserializer implements JsonDeserializer<Author> { private final ThreadLocal<Map<Integer, Author>> cache = new ThreadLocal<Map<Integer, Author>>() { @Override protected Map<Integer, Author> initialValue() { return new HashMap<>();
From source file com.javacreed.examples.gson.part3.BookDeserializer.java
public class BookDeserializer implements JsonDeserializer<Book> { @Override public Book deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) throws JsonParseException { final JsonObject jsonObject = json.getAsJsonObject();
From source file com.jbirdvegas.mgerrit.objects.Projects.java
public class Projects implements JsonDeserializer<Projects> { private List<Project> projects; public Projects() { projects = new ArrayList<>();