JSONb-1.0.5: JSON parser that uses byte strings.



Parse UTF-8 JSON into native Haskell types.



decode :: ByteString -> Either String JSONSource

Interpret a ByteString as any JSON literal.

break :: ByteString -> (Either String JSON, ByteString)Source

Split out the first parseable JSON literal from the input, returning the result of the attempt along with the remainder of the input or the whole input if no parseable item was discovered.

json :: Parser JSONSource

Tries to parse any JSON literal.

object :: Parser JSONSource

Parse a JSON object (dictionary).

array :: Parser JSONSource

Parse a JSON array.

string :: Parser JSONSource

Parses a string literal, unescaping as it goes.

number :: Parser JSONSource

Parses a numeric literal to a Rational.

boolean :: Parser JSONSource

Parse a JSON Boolean literal.

null :: Parser JSONSource

Parse a JSON null literal.

whitespace :: Parser ()Source

Per RFC 4627, section 2 JSON Grammar, only a limited set of whitespace characters actually count as insignificant whitespace.

string_literal :: Parser ByteStringSource

Parse a JSON string literal and unescape it but don't wrap it in a string constructor (we might wrap it as a dict key instead).