Closed talios closed 10 years ago
The default (and currently only) formatting is designed to be as compact as possible while still being possible to parse, but it sure isn't pretty.
I'm considering your patch.
Would it help you if I finished up my work on a simple pretty-printer for edn-java (see https://github.com/bpsm/edn-java/commits/feature/pp)? It would produce output like this:
{
key1 value
key2 [
value
value
]
}
I've incorporated your suggested formatting experimentally as LooseFormatter. https://github.com/bpsm/edn-java/commit/a9e1f48c613bd6d9f3856df7528eaa8ce91824e3
I've also added the option to pretty-print edn output. https://github.com/bpsm/edn-java/commit/428da6508b2601669ad12a7afaa90580824c7362
These changes will both be included in the next release. (0.4.4).
+1 cheers - sorry I didn't get back to you earlier about this. Look forward to the release.
When writing out some Java structures to EDN I found that not everything was correctly adding in softspaces, such that the following output was being generated:
Whilst this parses, it doesn't look very nice when trying to diagnose other problems.