json2-0.8.1: Library provides support for JSON.

Data.JSON2.Blaze

Description

Efficient build ByteString from Json with escaped string.

For example - use in YESOD:

    import Yesod
    import Data.JSON2       as JSON
    import Data.JSON2.Blaze as JSON
    import Blaze.ByteString.Builder (toLazyByteString)
    --
    toRepJson :: ToJson a => a -> RepJson
    toRepJson =  RepJson . toContent . toLazyByteString . (JSON.blazeJson) . (JSON.toJson)

Documentation