json-b-0.0.4: JSON parser that uses byte strings.

Text.JSONb.Encode

Synopsis

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.

data Style Source

Style of serialization. Compact is the only one that is implemented at present.

Constructors

Compact 

Instances

stringify :: ByteString -> ByteStringSource

Escape a ByteString representing a JSON string and wrap it in quote marks.