Jaxon (Jaxon v2.0.8) View Source
Main Jaxon module.
Link to this section Summary
Link to this section Types
Specs
Link to this section Functions
Specs
decode(String.t()) :: {:ok, json_term()} | {:error, %Jaxon.ParseError{ __exception__: term(), expected: term(), message: term(), unexpected: term() }}
Decode a string.
iex> Jaxon.decode(~s({"jaxon":"rocks","array":[1,2]}))
{:ok, %{"array" => [1, 2], "jaxon" => "rocks"}}
Specs
Decode a string, throws if there's an error.
iex(1)> Jaxon.decode!(~s({"jaxon":"rocks","array":[1,2]}))
%{"array" => [1, 2], "jaxon" => "rocks"}