Safe Haskell | None |
---|
Aeson-compatible pretty-printing of JSON Value
s.
- encodePretty :: ToJSON a => a -> ByteString
- encodePretty' :: ToJSON a => Int -> a -> ByteString
Documentation
encodePretty :: ToJSON a => a -> ByteStringSource
A drop-in replacement for aeson's encode
function, producing
JSON-ByteStrings for human readers.
Indents by four spaces per nesting-level.
encodePretty' :: ToJSON a => Int -> a -> ByteStringSource
A variant of encodePretty
that takes an additional parameter: the number
of spaces to indent per nesting-level.