Added jsonRaw function

This commit is contained in:
Michael Snoyman 2010-07-11 07:25:56 +03:00
parent 9f75a77fcc
commit ecd39ed587

View File

@ -10,6 +10,7 @@ module Yesod.Json
, jsonScalar
, jsonList
, jsonMap
, jsonRaw
#if TEST
, testSuite
#endif
@ -114,6 +115,12 @@ jsonMap (x:xs) = mconcat
, v
]
-- | Outputs raw JSON data without performing any escaping. Use with caution:
-- this is the only function in this module that allows you to create broken
-- JSON documents.
jsonRaw :: S.ByteString -> Json
jsonRaw bs = Json $ unsafeByteString bs
#if TEST
testSuite :: Test