28 lines
515 B
Text
28 lines
515 B
Text
|
{-|
|
||
|
Create a JSON null
|
||
|
|
||
|
```
|
||
|
let JSON = ./package.dhall
|
||
|
in JSON.render JSON.null
|
||
|
= "null"
|
||
|
```
|
||
|
-}
|
||
|
let JSON = ./Type.dhall
|
||
|
|
||
|
let null
|
||
|
: JSON
|
||
|
= λ(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.null
|
||
|
|
||
|
in null
|