dhall-haskell/dhall-json
Simon Jakobi e931451a2b Format more text literals as multi-line strings (#1508)
This causes text literals to be formatted as multi-line strings
whenever they contain at least one newline and at least one non-newline
character. "Spacers" like `"\n\n"` continue be formatted as single-line
strings. If the heuristic turns out to be too eager to choose a
multi-line layout, we can refine it later.

This partially addresses #1496.

Also

* update some variable names

* use 80-column "smart" layout consistently
2019-11-04 03:31:49 +00:00
..
dhall-to-json Add the `--preserveNull` flag and omit null fields by default on `dhall-to-yaml` (#1365) 2019-10-04 02:21:47 +00:00
dhall-to-yaml Add the `--preserveNull` flag and omit null fields by default on `dhall-to-yaml` (#1365) 2019-10-04 02:21:47 +00:00
examples Remove usage of legacy Optional syntax (#1091) 2019-07-14 18:36:41 +00:00
json-to-dhall Format more text literals as multi-line strings (#1508) 2019-11-04 03:31:49 +00:00
src/Dhall Format more text literals as multi-line strings (#1508) 2019-11-04 03:31:49 +00:00
tasty Fix `dhall-to-yaml` to quote special strings (#1474) 2019-10-25 08:29:32 -07:00
yaml-to-dhall Format more text literals as multi-line strings (#1508) 2019-11-04 03:31:49 +00:00
.gitignore Migrate `dhall-{bash,json,text}` into this repository (#661) 2018-10-28 17:32:51 -07:00
CHANGELOG.md Make some of CLI options for dhall-json more consistent (#1475) 2019-10-29 19:05:13 +00:00
LICENSE.BSD3 Version 1.26.1 → 1.27.0 (#1428) 2019-10-20 07:00:43 -07:00
LICENSE.GPLv3 Version 1.26.1 → 1.27.0 (#1428) 2019-10-20 07:00:43 -07:00
README.md Version 1.19.1 → 1.20.0 (#767) 2018-12-29 11:48:21 -06:00
Setup.hs Migrate `dhall-{bash,json,text}` into this repository (#661) 2018-10-28 17:32:51 -07:00
default.nix Install mostly static executables on OS X when using Nix (#830) 2019-03-04 19:43:31 -08:00
dhall-json.cabal Version 1.26.1 → 1.27.0 (#1428) 2019-10-20 07:00:43 -07:00
release.nix Migrate `dhall-{bash,json,text}` into this repository (#661) 2018-10-28 17:32:51 -07:00
shell.nix Migrate `dhall-{bash,json,text}` into this repository (#661) 2018-10-28 17:32:51 -07:00

README.md

dhall-json

For installation or development instructions, see:

Full documentation here:

Introduction

This dhall-json package provides a Dhall to JSON compiler and a Dhall to YAML compiler. The reason this package is called dhall-json is that the Haskell yaml library uses the same data structure as Haskell's aeson library for JSON

Example

$ dhall-to-json <<< "{ foo = 1, bar = True }"
{"foo":1,"bar":true}
$ dhall-to-json <<< "List/head Natural ([] : List Natural)"
null
$ dhall-to-yaml <<< "{ foo = [1, 2, 3], bar = { baz = True } }"
foo:
- 1
- 2
- 3
bar:
  baz: true