Text.JSONb.Decode
Description
Parse UTF-8 JSON into native Haskell types.
- decode :: ByteString -> Either (ParseError, ByteString) JSON
- break :: ByteString -> (Either ParseError JSON, ByteString)
- json :: Parser JSON
- object :: Parser JSON
- array :: Parser JSON
- string :: Parser JSON
- number :: Parser JSON
- boolean :: Parser JSON
- null :: Parser JSON
- whitespace :: Parser ()
- string_literal :: Parser ByteString
- strictify :: ByteString -> ByteString
Documentation
decode :: ByteString -> Either (ParseError, ByteString) JSONSource
Interpret a ByteString
as any JSON literal.
break :: ByteString -> (Either ParseError 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 not parseable item was discovered.
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).
strictify :: ByteString -> ByteStringSource
Turn a lazy ByteString
in to a strict ByteString
.