Fix broken example.
Fixes bug 360.
This commit is contained in:
parent
de727d8c48
commit
01661426f9
|
@ -49,7 +49,7 @@ import java.lang.reflect.Type;
|
|||
*
|
||||
* <pre>
|
||||
* class IdDeserializer implements JsonDeserializer<Id>() {
|
||||
* public Id fromJson(JsonElement json, Type typeOfT, JsonDeserializationContext context)
|
||||
* public Id deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
|
||||
* throws JsonParseException {
|
||||
* return (Id) new Id((Class)typeOfT, id.getValue());
|
||||
* }
|
||||
|
|
|
@ -49,7 +49,7 @@ import java.lang.reflect.Type;
|
|||
*
|
||||
* <p><pre>
|
||||
* class IdSerializer implements JsonSerializer<Id>() {
|
||||
* public JsonElement toJson(Id id, Type typeOfId, JsonSerializationContext context) {
|
||||
* public JsonElement serialize(Id id, Type typeOfId, JsonSerializationContext context) {
|
||||
* return new JsonPrimitive(id.getValue());
|
||||
* }
|
||||
* }
|
||||
|
|
Loading…
Reference in New Issue
Block a user