Packages
aws
0.8.0
1.0.14
1.0.13
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.14.1
0.14.0
0.13.3
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.1
0.10.0
0.9.2
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
AWS clients for Elixir
Current section
Files
Jump to
Current section
Files
lib/aws/json.ex
defmodule AWS.JSON do
@moduledoc """
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, %{})
"""
@doc """
Encodes a map into JSON iodata. Raises in case of errors.
"""
@callback encode_to_iodata!(input :: map(), options :: keyword()) :: iodata()
@doc """
Decodes a JSON into a map. Raises in case of errors.
"""
@callback decode!(input :: iodata(), options :: keyword()) :: map()
defdelegate encode_to_iodata!(input, options), to: Jason, as: :encode!
defdelegate decode!(input, options), to: Jason
end