Stripe.Deserializer (tiger_stripe v0.1.10)

Copy Markdown View Source

Deserializes JSON strings and raw maps into typed Stripe structs.

Used internally by the client to cast API responses. Also provides from_json/1 for manual deserialization of JSON payloads.

Summary

Functions

Decode a JSON string and cast into typed structs.

Functions

cast(data, opts \\ [])

@spec cast(
  map() | list() | term(),
  keyword()
) :: struct() | map() | list() | term()

from_json(json_string, opts \\ [])

@spec from_json(
  String.t(),
  keyword()
) :: {:ok, term()} | {:error, term()}

Decode a JSON string and cast into typed structs.