Is there a specification for dhall-to-{json,yaml} and {json,yaml}-to-dhall?
As part of my study of programming language theory, I have recently implemented a Dhall interpreter in Scala, which was a great experience because the Dhall language is so well documented and there is a standard test suite. My project is here https://github.com/winitzki/scall
Now I would like to be able to implement also the converters from Dhall to json/yaml and back. Where do I begin? Is there some specification or documentation about how Dhall expressions are converted to json/yaml and back? Is there a standard test suite that exercises all options?
The conversion between JSON and YAML is not part of the Dhall standard. In fact, the standard doesn't actually specify anything about how Dhall expressions are converted to any file format, with one caveat: the standard does provide utilities in the Prelude specifically designed for use with some of the (non-standard) Dhall conversion utilities (e.g. dhall-to-json).
All of the logic for the Dhall conversions to and from JSON and YAML resides in the dhall-haskell repository, specifically in the dhall-json and dhall-yaml subprojects. Those subprojects also have test suites although they're nowhere near as comprehensive as the standard test suite.
Thank you. I have seen that there are actually two different YAML conversions (dhall-to-yaml and dhall-to-yaml-ng). They produce quite different YAML output from the same Dhall input. It is probably not very important to standardize the specific YAML output. JSON output could be standardized though. For now, I have had enough information to implement those conversions in my project.