Copyright | (C) 2015-2016 Oleg Grenrus |
---|---|
License | BSD3 |
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- streamDecode :: forall a. FromJSON a => ByteString -> ([a], Maybe String)
Documentation
streamDecode :: forall a. FromJSON a => ByteString -> ([a], Maybe String) Source #
Lazyly parse ByteString
with top-level JSON array.
Note: inspecting result's second field will force the list!
let ~(values, err) = streamDecode
bs
traverse_ processValue values
maybe (pure ()) printError err
Since: 0.3.2.0