Class BodyErrorJsonDeserializer
java.lang.Object
org.eclipse.keyple.core.util.json.BodyErrorJsonDeserializer
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<BodyError>
public class BodyErrorJsonDeserializer
extends Object
implements com.google.gson.JsonDeserializer<BodyError>
JSON deserializer of a
BodyError.
It is not necessary to define a serializer because the type of the associated object registered is a class and not an interface, and therefore has fields. Gson will then use its default reflexivity mechanism to serialize the object.
The original exception is only rebuilt if its class belongs to the java,
org.eclipse.keyple or org.eclipse.keypop packages (or their sub-packages) and is a
subclass of Exception. Otherwise, or if the original exception cannot be rebuilt, it is
replaced by a RuntimeException whose message contains the name of the original class and
its original message.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext context)
-
Constructor Details
-
BodyErrorJsonDeserializer
public BodyErrorJsonDeserializer()
-
-
Method Details
-
deserialize
public BodyError deserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException - Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<BodyError>- Throws:
com.google.gson.JsonParseException- Since:
- 2.0.0
-