Class UntypedMapDeserializer

java.lang.Object
com.stripe.net.UntypedMapDeserializer

public class UntypedMapDeserializer extends 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 generic Map<String, Object>.
  • 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

      public Map<String,Object> deserialize(com.google.gson.JsonObject jsonObject)
      Deserialize JSON into untyped map. JsonArray is represented as List<Object>. JsonObject is represented as Map<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.