jordan-0.2.0.0: JSON with Structure
Safe HaskellNone
LanguageHaskell2010

Jordan.FromJSON.Attoparsec

Description

Implementation of FromJSON parsers via Attoparsec.

This module does not construct intermediate data structures like maps or key-value lists, and instead uses permutation parsers in order to parse your data structure directly. This means that it is pretty fast! However, you also get basically *zero* error reporting, which is generally not what you want.

Synopsis

Documentation

attoparsecParserFor :: (forall parser. JSONParser parser => parser a) -> Parser a Source #

Convert an abstract JSON parser to an Attoparsec Parser. This function will skip leading whitespace.

parseViaAttoparsecWith :: (forall parser. JSONParser parser => parser a) -> ByteString -> Either String a Source #

parseViaAttoparsec :: forall val. FromJSON val => ByteString -> Either String val Source #

Parse a ByteString via an Attoparsec Parser.

attoparsecParser :: FromJSON val => Parser val Source #

Get an Attoparsec parser for a particular JSON-parsable value.