Package com.stripe.net
Class UntypedMapDeserializer
- java.lang.Object
-
- com.stripe.net.UntypedMapDeserializer
-
public class UntypedMapDeserializer extends java.lang.Object
Deserializer to convert JSON object into an untyped map. While we strive to provide more typed content in this library, there are instances we need to convert our specific choice of JSON representation (using GSON) to a genericMap<String, Object>
.
-
-
Constructor Summary
Constructors Constructor Description UntypedMapDeserializer()
Default deserializer for the untyped map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
deserialize(com.google.gson.JsonObject jsonObject)
Deserialize JSON into untyped map.
-
-
-
Method Detail
-
deserialize
public java.util.Map<java.lang.String,java.lang.Object> deserialize(com.google.gson.JsonObject jsonObject)
Deserialize JSON into untyped map.JsonArray
is represented asList<Object>
.JsonObject
is represented asMap<String, Object>
.JsonPrimitive
is represented as String, Number, or Boolean.- Parameters:
jsonObject
- JSON to convert into untyped map- Returns:
- untyped map without dependency on JSON representation.
-
-