Added jsonRaw function
This commit is contained in:
parent
9f75a77fcc
commit
ecd39ed587
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user