dhall-json
Convert between Dhall and JSON or YAML
| Version on this page: | 1.6.2 | 
| LTS Haskell 21.25: | 1.7.11@rev:1 | 
| Stackage Nightly 2023-06-21: | 1.7.11@rev:1 | 
| Latest on Hackage: | 1.7.12@rev:4 | 
BSD-3-Clause licensed by Gabriel Gonzalez
Maintained by [email protected]
This version can be pinned in stack with:
dhall-json-1.6.2@sha256:e4e7a56ada027ee6aa901a759dee46a5076eaa6c401ef9efbf4a7ee8014ad9ae,4087Module documentation for 1.6.2
- Dhall- Dhall.DhallToYaml
- Dhall.JSON
- Dhall.JSONToDhall
 
Depends on 18 packages(full list with versions):
Used by 2 packages in lts-15.3(full list with versions):
Use this package if you want to convert between Dhall expressions and JSON or YAML. You can use this package as a library or an executable:
- See the - Dhall.JSONmodule if you want to use this package as a library
- Use the - dhall-to-jsonor- dhall-to-yamlprograms from this package if you want an executable
The Dhall.JSON module also contains instructions for how to use this
package
Changes
1.6.2
- Fix dhall-jsonfor newPrelude.JSON.Type- Version 13.0.0 of the Prelude caused the JSONtype to change, which brokedhall-json’s support for that type
- This release fixes that (and still supports the old JSONtype)
 
- Version 13.0.0 of the Prelude caused the 
1.6.1
1.6.0
- BREAKING CHANGE: Move HsYAMLcode to a newdhall-yamlpackage- This package is now fully BSD-licensed (both for the JSON and YAML utilities)
- The GPL-licensed YAML utilities are now provided as part of the
dhall-yamlpackage
- Note that this package still provides dhall-to-yamland thedhall-yamlpackage provides a separatedhall-to-yaml-ngexecutable
- This is a breaking change in the following respects:
- The YAML-related modules in this package were renamed
- This package no longer accepts a -fgplcabal configure flag
- This package no longer provides the yaml-to-dhallexecutable (which now resides within thedhall-yamlpackage)
 
 
- BREAKING CHANGE: Rename some options of dhall-to-{json,yaml}to more consistent ones:- rename --omitEmptyto--omit-empty
- rename --preserveNullto--preserve-null
- rename --noMapsto--no-maps
- drop --omitNullas redundant because of--preserve-null(see below)
 
- rename 
- BUG FIX: Handle empty maps correctly
- dhall-to-{json,yaml}now correctly translate empty Dhall maps to empty JSON dictionaries
 
- Add Dhall.JSON.defaultConversion
- Don’t normalize schema before type-checking
- This improves the error messages for {json,yaml}-to-dhall
 
- This improves the error messages for 
- Fix dhall-to-yamlto quote special strings
- Make some of CLI options for dhall-jsonmore consistent
1.5.0
- BREAKING CHANGE: Enable --prettyby default fordhall-to-json
- BREAKING CHANGE: Enable --omitNullby default fordhall-to-{json,yaml}- To recover the old behavior use the --preserveNullflag
 
- To recover the old behavior use the 
- Add support for building against the HsYAMLpackage #1248 / #1417 / #1420- To enable the use of HsYAML, enable the-fgplcabal configureflag, which means that anything built using that flag is GPLv3 licensed
- By default dhall-jsonbuilds againstaeson-yamlwhich is BSD-3 licensed
- The yaml-to-dhallexecutable is only available with the-fgplflag, meaning that it is necessarily GPLv3 licensed
 
- To enable the use of 
- New --omissible-listsflag for{json,yaml}-to-dhall- This flag is sort of the inverse of the --omitEmptyflag, meaning that missing YAML/JSON lists can be translated to present (but empty) Dhall lists
 
- This flag is sort of the inverse of the 
1.4.1
- Enable --records-strictby default for{json-yaml}-to-dhall
- Fix --fileflag fordhall-to-{json,yaml}
- Fix --versionflag for{yaml,json}-to-dhall
- Nesting: Support empty alternatives as contents
- Fix yaml-to-dhallsupport for empty objects
- Throw error when union value is incompatible with inline nesting
- Add --outputoptions
- Minor bug fixes for yaml-to-dhallerror messages
1.4.0
- BREAKING CHANGE: Split Dhall.YAMLintoDhall.YAML+Dhall.YAMLToDhall
- BUG FIX: Fix dhall-to-{json,yaml}’s support for preserving alternative names- The Nested/Inlineunions are now correctly given special treatment again
- See: https://github.com/dhall-lang/dhall-haskell/pull/1080
 
- The 
- Feature: Support weakly-typed JSON value added to Prelude
- You can now encode/decode values of type ./Prelude/JSON/Typewhich can store arbitrary JSON
- This is useful when dealing with “pass-through” or schema-free JSON values
- See: https://github.com/dhall-lang/dhall-haskell/pull/1007
 
- You can now encode/decode values of type 
- Feature: Eta support for dhall-json
- Feature: Add --fileoption todhall-jsonexecutables
- Feature: Support unions for keys
- You can now decode record fields as enums instead of Textso that you can pattern match on them
- See: https://github.com/dhall-lang/dhall-haskell/pull/1094
 
- You can now decode record fields as enums instead of 
- Pretty-print output of {json,yaml}-to-dhall
1.3.0
- BREAKING CHANGE: Change YAML/JSON encoding for NaN/Infinity/-Infinity- They are now encoded as the standard "nan"/"inf"/"-inf"representations instead ofnull/MIN_DOUBLE//MAX_DOUBLE
- See: https://github.com/dhall-lang/dhall-haskell/pull/946
 
- They are now encoded as the standard 
- BREAKING CHANGE: Isolate YAML code to one modulee
- This is a breaking change because it moves Dhall.JSON.jsonToYamltoDhall.YAML.jsonToYaml
- See: https://github.com/dhall-lang/dhall-haskell/pull/989
 
- This is a breaking change because it moves 
- New yaml-to-dhallcommand-line utility
- Add --quotedflag to force quoting of YAML string literals
1.2.8
- New json-to-dhallcommand-line utility
- --omitEmptynow also omits empty arrays
- Build against dhall-1.22.0
- Improved error messages:
1.2.7
- Build against dhall-1.21.0
- Support GHC 7.10.3
- Add new --omitEmptyflag for omitting nulls and empty records
1.2.6
- Add --versionflag
- Build against tasty-1.2
- Add --compactflag todhall-to-json- Eventually --prettywill become the default, so this flag provides a way for a user to preserve the old 1-line output when that happens
- See: https://github.com/dhall-lang/dhall-haskell/pull/743
 
- Eventually 
1.2.5
- Build against dhall-1.19.0
1.2.4
- Build against dhall-1.18.0
- New dhall-to-yaml--documentsflag for generating split documents
- Build against yaml-0.10.2.0- This improves the multi-line string literals in generated YAML
- See: https://github.com/dhall-lang/dhall-json/pull/57
 
1.2.3
- Correctly handle nested association lists
- Increase upper bound on dhalldependency
- Increase upper bound on yamldependency
1.2.2
- Increase upper bound on dhalldependency
- Increase upper bound on yamldependency
1.2.1
- Add support for preserving sum type tags
- Sort keys when pretty-printing JSON
- Increase upper bound on dhalldependency
1.2.0
- BREAKING CHANGE: Add support for converting association lists to JSON records
- This changes the behavior for records with two keys named mapKeyandmapValue
 
- This changes the behavior for records with two keys named 
- Fix --helpto not printExitSuccess
- Fix lower bound on dhalldependency
- Remove optparse-genericdependency
- Increase upper bound on dhalldependency
1.1.0
- BREAKING CHANGE: Build against dhall-1.13.0- This requires a breaking change to the type of codeToValue
 
- This requires a breaking change to the type of 
1.0.13
- Add --omitNullflag to omit null-valued fields from generated JSON records
- Add codeToValue
- Increase upper bound on dhalldependency
1.0.12
- Increase upper bound on aesondependency
- Increase upper bound on dhalldependency
1.0.11
- Increase upper bound on dhalldependency
- Increase upper bound on optparse-genericdependency
1.0.10
- Increase upper bound on dhalldependency
1.0.9
- Add trailing newline to JSON output
- Remove dependency on QuasiQuotes
1.0.8
- Increase upper bound on dhalldependency
1.0.7
- Add --prettyflag
- Increase upper bound on dhalldependency
1.0.6
- Increase upper bound on aesondependency
- Increase upper bound on dhalldependency
1.0.5
- Increase upper bound on optparse-genericdependency
- Increase upper bound on trifectadependency
1.0.4
- Increase upper bound on dhalldependency
1.0.3
- Increase upper bound on dhalldependency
1.0.2
- Add support for translating unions by stripping the tag
- Increase upper bound on dhalldependency
1.0.1
- Increase upper bound on dhalldependency
1.0.0
- Initial release
