Added jsonRaw function
This commit is contained in:
parent
9f75a77fcc
commit
ecd39ed587
@ -10,6 +10,7 @@ module Yesod.Json
|
|||||||
, jsonScalar
|
, jsonScalar
|
||||||
, jsonList
|
, jsonList
|
||||||
, jsonMap
|
, jsonMap
|
||||||
|
, jsonRaw
|
||||||
#if TEST
|
#if TEST
|
||||||
, testSuite
|
, testSuite
|
||||||
#endif
|
#endif
|
||||||
@ -114,6 +115,12 @@ jsonMap (x:xs) = mconcat
|
|||||||
, v
|
, 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
|
#if TEST
|
||||||
|
|
||||||
testSuite :: Test
|
testSuite :: Test
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user