Package com.stripe.net
Class UntypedMapDeserializer
java.lang.Object
com.stripe.net.UntypedMapDeserializer
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 generic
Map<String, Object>
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonObject jsonObject) Deserialize JSON into untyped map.
-
Constructor Details
-
UntypedMapDeserializer
public UntypedMapDeserializer()Default deserializer for the untyped map. The result untyped map has same object graph structure as that of the given JSON content.
-
-
Method Details
-
deserialize
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.
-