ndjson-conduit-0.1.0.2: Conduit-based parsing and serialization for newline delimited JSON.

LicenseMIT
MaintainerSam Rijs <srijs@airpost.net>
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Conduit.JSON.NewlineDelimited

Contents

Description

 

Synopsis

Serialization

serializer :: (Monad m, ToJSON a) => Conduit a m ByteString Source

Consumes a stream of serializable values, and provides a stream of bytestrings.

valueSerializer :: Monad m => Conduit Value m ByteString Source

Consumes a stream of aeson values, and provides a stream of bytestrings.

Parsing

parser :: (Monad m, FromJSON a) => Conduit ByteString m a Source

Consumes a stream of bytestrings, and provides a stream of parsed values, ignoring all parse errors.

maybeParser :: (Monad m, FromJSON a) => Conduit ByteString m (Maybe a) Source

Consumes a stream of bytestrings, and provides a stream of just parsed values, or nothing on parse error.

eitherParser :: (Monad m, FromJSON a) => Conduit ByteString m (Either String a) Source

Consumes a stream of bytestrings, and provides a stream of right parsed values, or left strings describing the parse error.

valueParser :: Monad m => Conduit ByteString m Value Source

Consumes a stream of bytestrings, and provides a stream of aeson values, ignoring all parse errors.

maybeValueParser :: Monad m => Conduit ByteString m (Maybe Value) Source

Consumes a stream of bytestrings, and provides a stream of just aeson values, or nothing on parse error.

eitherValueParser :: Monad m => Conduit ByteString m (Either String Value) Source

Consumes a stream of bytestrings, and provides a stream of right aeson values, or left strings describing the parse error.

resultValueParser :: Monad m => Conduit ByteString m (Result Value) Source

Consumes a stream of bytestrings, and provides a stream of parse results.