Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- jsonToLBSC :: (ToJSON a, Monad m) => ConduitT a o m ByteString
- sinkFileC :: (ToJSON a, MonadResource m) => FilePath -> ConduitT a o m ()
- jsonFromLBSC :: (FromJSON a, Monad m) => ByteString -> ConduitT Void a m ()
- sourceFileC :: (MonadResource m, FromJSON a) => FilePath -> ConduitT () a m ()
Encode
jsonToLBSC :: (ToJSON a, Monad m) => ConduitT a o m ByteString Source #
Render a stream of JSON-encodable objects into a ByteString
I/O
:: (ToJSON a, MonadResource m) | |
=> FilePath | path of JSONL file to be created |
-> ConduitT a o m () |
Render a stream of JSON-encodable objects into a JSONL file
Decode
jsonFromLBSC :: (FromJSON a, Monad m) => ByteString -> ConduitT Void a m () Source #
Source a ByteString
for JSONL records
I/O
:: (MonadResource m, FromJSON a) | |
=> FilePath | path of JSONL file to be read |
-> ConduitT () a m () |
Read a JSONL file and stream the decoded records
NB : ignores any parsing errors and returns