play.modules.morphia.utils
Class ObjectIdGsonAdapter
java.lang.Object
play.modules.morphia.utils.ObjectIdGsonAdapter
- All Implemented Interfaces:
- com.google.gson.JsonDeserializer<ObjectId>, com.google.gson.JsonSerializer<ObjectId>
public class ObjectIdGsonAdapter
- extends Object
- implements com.google.gson.JsonSerializer<ObjectId>, com.google.gson.JsonDeserializer<ObjectId>
Method Summary |
ObjectId |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context)
|
com.google.gson.JsonElement |
serialize(ObjectId src,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectIdGsonAdapter
public ObjectIdGsonAdapter()
deserialize
public ObjectId deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context)
throws com.google.gson.JsonParseException
- Specified by:
deserialize
in interface com.google.gson.JsonDeserializer<ObjectId>
- Throws:
com.google.gson.JsonParseException
serialize
public com.google.gson.JsonElement serialize(ObjectId src,
Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
- Specified by:
serialize
in interface com.google.gson.JsonSerializer<ObjectId>
Copyright © 2012. All Rights Reserved.