AWS.JSON behaviour (aws-elixir v0.8.0) View Source

Specifies the behaviour of a JSON parser.

You can switch the default JSON parser which uses Jason underneath by defining a different implementation by setting the :json_module configuration in AWS.Client:

client = %AWS.Client{json_module: MyCustomJSONParser}
AWS.SNS.publish(client, %{})

Link to this section Summary

Callbacks

Decodes a JSON into a map. Raises in case of errors.

Encodes a map into JSON iodata. Raises in case of errors.

Link to this section Functions

Link to this section Callbacks

Specs

decode!(input :: iodata(), options :: keyword()) :: map()

Decodes a JSON into a map. Raises in case of errors.

Link to this callback

encode_to_iodata!(input, options)

View Source

Specs

encode_to_iodata!(input :: map(), options :: keyword()) :: iodata()

Encodes a map into JSON iodata. Raises in case of errors.