View Source Cosmox.Helpers.DeserializationHelpers (Cosmox v0.1.0)

Collection of helper functions to help deserialize to struct or simple maps.

Link to this section Summary

Functions

Deserialises a string to the given structs, or to a simple map if no struct is given.

Link to this section Functions

Link to this function

deserialize(encoded_string, struct \\ nil)

View Source
@spec deserialize(encoded_string :: binary(), struct :: term() | nil) ::
  {:ok, term() | map()} | {:error, Cosmox.Response.ErrorMessage.t()}

Deserialises a string to the given structs, or to a simple map if no struct is given.