json v1.0.3 JSON.Parser.Bitstring.Object View Source
Implements a JSON Object Parser for Bitstring values
Link to this section Summary
Functions
parses a valid JSON object value, returns its elixir representation
Link to this section Functions
parses a valid JSON object value, returns its elixir representation
Examples
iex> JSON.Parser.Bitstring.Object.parse ""
{:error, :unexpected_end_of_buffer}
iex> JSON.Parser.Bitstring.Object.parse "face0ff"
{:error, {:unexpected_token, "face0ff"}}
iex> JSON.Parser.Bitstring.Object.parse "[] "
{:error, {:unexpected_token, "[] "}}
iex> JSON.Parser.Bitstring.Object.parse "[]"
{:error, {:unexpected_token, "[]"}}
iex> JSON.Parser.Bitstring.Object.parse "[\"foo\", 1, 2, 1.5] lala"
{:error, {:unexpected_token, "[\"foo\", 1, 2, 1.5] lala"}}
iex> JSON.Parser.Bitstring.Object.parse "{\"result\": \"this will be a elixir result\"} lalal"
{:ok, Enum.into([{"result", "this will be a elixir result"}], Map.new), " lalal"}