Jason.Structs (jason_structs v0.2.0) View Source

Link to this section Summary

Link to this section Types

Specs

encode_opt() ::
  {:escape, :json | :unicode_safe | :html_safe | :javascript_safe}
  | {:maps, :naive | :strict}
  | {:pretty, boolean() | Jason.Formatter.opts()}

Link to this section Functions

Link to this function

decode(bitstring_or_char_list, struct_module)

View Source

Specs

decode(iodata(), atom()) :: {:ok, term()} | {:error, DecodeError.t()}

See Jason.Structs.Decoder.decode/2.

Link to this function

decode!(bitstring_or_char_list, struct_module)

View Source

Specs

decode!(iodata(), atom()) :: term() | no_return()
Link to this function

encode(term, encode_opts \\ [])

View Source

Specs

encode(term(), [encode_opt()]) ::
  {:ok, String.t()} | {:error, EncodeError.t() | Exception.t()}

See Jason.encode/2.

Link to this function

encode!(term, encode_opts \\ [])

View Source

Specs

encode!(term(), [encode_opt()]) :: String.t() | no_return()

See Jason.encode!/2.