Parse UTF-8 JSON into native Haskell types.
Documentation
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.
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).