json v1.0.3 JSON.Parser.Charlist.Object View Source

Implements a JSON Object Parser for Charlist values

Link to this section Summary

Functions

parses a valid JSON object value, returns its elixir Map representation

Link to this section Functions

parses a valid JSON object value, returns its elixir Map representation

Examples

iex> JSON.Parser.Charlist.Object.parse ''
{:error, :unexpected_end_of_buffer}

iex> JSON.Parser.Charlist.Object.parse 'face0ff'
{:error, {:unexpected_token, 'face0ff'}}

iex> JSON.Parser.Charlist.Object.parse '[] '
{:error, {:unexpected_token, '[] '}}

iex> JSON.Parser.Charlist.Object.parse '[]'
{:error, {:unexpected_token, '[]'}}

iex> JSON.Parser.Charlist.Object.parse '{"result": "this will be a elixir result"} lalal'
{:ok, Enum.into([{"result", "this will be a elixir result"}], Map.new), ' lalal'}