json v1.0.3 JSON.Parser.Bitstring.Array View Source

Implements a JSON Array Parser for Bitstring values

Link to this section Summary

Functions

parses a valid JSON array value, returns its elixir list representation

Link to this section Functions

parses a valid JSON array value, returns its elixir list representation

Examples

iex> JSON.Parser.Bitstring.Array.parse ""
{:error, :unexpected_end_of_buffer}

iex> JSON.Parser.Bitstring.Array.parse "[1, 2 "
{:error, :unexpected_end_of_buffer}

iex> JSON.Parser.Bitstring.Array.parse "face0ff"
{:error, {:unexpected_token, "face0ff"}}

iex> JSON.Parser.Bitstring.Array.parse "[] lala"
{:ok, [], " lala"}

iex> JSON.Parser.Bitstring.Array.parse "[]"
{:ok, [], ""}

iex> JSON.Parser.Bitstring.Array.parse "[\"foo\", 1, 2, 1.5] lala"
{:ok, ["foo", 1, 2, 1.5], " lala"}