It has been noted before that --xml does not produce valid XML! OTOH,
creating valid JSON is a very simple affair, due to well-designed and
well-maintained library support for JSON in Haskell, notably aeson.
There is no need to use aeson support for automatically creating
instances with TH, writing the instances manually is not complicated and
not even overly verbose.
Note that not all darcs commands currently support --xml. Again,
providing the --json option for those commands would be much simpler
than trying to extend the --xml format to them.
Once --json is implemented, we can deprecate --xml and get rid of this wart.