Text.JSONb.Encode
- encode :: Style -> JSON -> ByteString
- encode' :: Style -> JSON -> ByteString
- data Style = Compact
- stringify :: ByteString -> ByteString
Documentation
encode :: Style -> JSON -> ByteStringSource
Encode JSON
as a lazy ByteString
. All strings are treated as
UTF-8; ASCII control characters are escaped and UTF-8 multi-char sequences
are simply passed through.
encode' :: Style -> JSON -> ByteStringSource
Encode JSON
as a strict ByteString
. All strings are treated as UTF-8;
ASCII control characters are escaped and UTF-8 multi-char sequences are
simply passed through.
Style of serialization. Compact is the only one that is implemented at present.
Constructors
Compact |
stringify :: ByteString -> ByteStringSource
Escape a ByteString
representing a JSON string and wrap it in quote
marks.