Closed sordina closed 6 years ago
Oops I accidentally closed the issue! Sorry!
This is intentional. See:
https://github.com/dhall-lang/dhall-json/issues/2
... and:
https://github.com/dhall-lang/dhall-lang/wiki/Getting-started%3A-Generate-JSON-or-YAML#unions
Ah interesting, it certainly makes sense for flexibly generating JSON, but what about the other direction? Say I wanted to interpret some Dhall generated JSON with Haskell, is the idea that you would explicitly create a 'tagged' output representation if the output could be ambiguous?
So I don't have plans to convert in the other direction, but if I did I would most likely be strict in the conversion and reject weakly typed JSON
Thanks for the insight, I'll close the issue :)
You're welcome! 🙂
I could be wrong, but are the JSON representation of unions ambiguous?
Example: