View Source AWS.JSON behaviour (aws-elixir v1.0.0)

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, %{})

Summary

Callbacks

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

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

Callbacks

@callback 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
@callback encode_to_iodata!(input :: map(), options :: keyword()) :: iodata()

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

Functions