T - Type of the read objectpublic interface ObjectReader<T>
To generate an implementation, use GWT.create(Class).
Example :
public class Person {
public String firstName, lastName;
}
public interface PersonReader extends ObjectReader<Person> {}
PersonReader reader = GWT.create(PersonReader.class);
Person person = reader.read("{\"firstName\":\"Nicolas\",\"lastName\":\"Morel\"}");
person.firstName ==> "Nicolas"
person.lastName ==> "Morel"
T read(String input) throws JsonDeserializationException
input - JSON input to readJsonDeserializationException - if an exception occurs while reading the inputT read(String input, JsonDeserializationContext ctx) throws JsonDeserializationException
input - JSON input to readctx - Context for the full reading processJsonDeserializationException - if an exception occurs while reading the inputCopyright © 2016. All Rights Reserved.