Given a simple example JSON type:
data Test = Test
{ name :: Text
, age :: Int
} deriving (Show, Generic)
instance FromJSON Test
How can I use pipes-aeson to decode a stream of JSON messages coming over a socket using the decoded
lens? As an example I'd like to just print them out as they're parsed:
main = connect "127.0.0.1" "8000" $ \(socket, _) -> $ runEffect $
some use of zoom decoded? view decoded? >-> P.print