dhall-1.33.0: dhall-lang/Prelude/JSON/string
{- Create a JSON string from Dhall `Text`
```
let JSON = ./package.dhall
in JSON.render (JSON.string "ABC $ \" π")
= "\"ABC \\u0024 \\\" π\""
let JSON = ./package.dhall
in JSON.render (JSON.string "")
= "\"\""
```
-}
let JSON =
./Type sha256:40edbc9371979426df63e064333b02689b969c4cfbbccfa481216d2d1a6e9759
? ./Type
let string
: Text β JSON
= Ξ»(x : Text) β
Ξ»(JSON : Type) β
Ξ» ( json
: { array : List JSON β JSON
, bool : Bool β JSON
, double : Double β JSON
, integer : Integer β JSON
, null : JSON
, object : List { mapKey : Text, mapValue : JSON } β JSON
, string : Text β JSON
}
) β
json.string x
in string