jsonl-0.1.0.0: JSON Lines
Safe HaskellNone
LanguageHaskell2010

JSONL

Contents

Description

Synopsis

Encode

jsonlWriteFile :: (Foldable t, ToJSON a) => FilePath -> t a -> IO () Source #

Write a collection of objects to a JSONL-encoded file

jsonlToLBS :: (Foldable t, ToJSON a) => t a -> ByteString Source #

Render a collection of objects to a JSONL-encoded ByteString

Decode

jsonlFromLBS :: FromJSON a => ByteString -> Either String [a] Source #

Parse a JSONL-encoded collection of objects from a ByteString

If parsing fails, returns the first parsing error in a Left