Copyright | (c) 2011, 2012, 2013 Bryan O'Sullivan (c) 2011 MailRank, Inc. (c) 2008, 2009 Lennart Augustsson |
---|---|
License | BSD3 |
Maintainer | Bryan O'Sullivan <bos@serpentine.com> |
Stability | DEPRECATED |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Decoding and encoding
decode :: Data a => ByteString -> Maybe a Source
Efficiently deserialize a JSON value from a lazy ByteString
.
If this fails due to incomplete or invalid input, Nothing
is
returned.
This function parses immediately, but defers conversion. See
json
for details.
decode' :: Data a => ByteString -> Maybe a Source
Efficiently deserialize a JSON value from a lazy ByteString
.
If this fails due to incomplete or invalid input, Nothing
is
returned.
This function parses and performs conversion immediately. See
json'
for details.
encode :: Data a => a -> ByteString Source
Efficiently serialize a JSON value as a lazy ByteString
.