support for writing XDI/JSON/TREE and XDI/JSON/PARSE
bugfix