{- Dhall encoding of an arbitrary JSON value

   For example, the following JSON value:

```
[ { "foo": null, "bar": [ 1.0, true ] } ]
```

   ... corresponds to the following Dhall expression:

```
  λ(JSON : Type)
→ λ ( json
    : { array :
          List JSON → JSON
      , bool :
          Bool → JSON
      , null :
          JSON
      , number :
          Double → JSON
      , object :
          List { mapKey : Text, mapValue : JSON } → JSON
      , string :
          Text → JSON
      }
    )
→ json.object
  [ { mapKey = "foo", mapValue = json.null }
  , { mapKey =
        "bar"
    , mapValue =
        json.array [ json.number 1.0, json.bool True ]
    }
  ]
```

  You do not need to create these values directly, though.  You can use
  the utilities exported by `./package.dhall` to create values of this type,
  such as:

```
let JSON = ./package.dhall

in  JSON.object
    [ { mapKey = "foo", mapValue = JSON.null }
    , { mapKey =
          "bar"
      , mapValue =
          JSON.array [ JSON.number 1.0, JSON.bool True ]
      }
    ]
```

-}
let JSON/Type
    : Type
    =   ∀(JSON : Type)
      → ∀ ( json
          : { string :
                Text → JSON
            , number :
                Double → JSON
            , object :
                List { mapKey : Text, mapValue : JSON } → JSON
            , array :
                List JSON → JSON
            , bool :
                Bool → JSON
            , null :
                JSON
            }
          )
      → JSON

in  JSON/Type
