Open mvriel opened 12 years ago
Hi Mike,
As a disclaimer in front: I used XSLT to generate some docs back in the day, from xml into simple html and as a front end developer I like the ease of JSON.
I think output generators may use one or the other format, so I think later converters from one to the other format will be there anyway. You end up with either a XSLT to transform XML into the format you want or a coffeescript that runs on node to transform JSON into the format you want. At the end it will be a question of taste I guess.
But I still don't know yet. I think you know those structures better due to your docblox usage here. What do you think?
I think we shouldn't force any format. DocSpec can be completly abstract and format-agnostic. We can provide JSON-Schema for JSON, XML Schema/DTD/whatever for XML etc, but there can be cases where XML can be more usefull and natural. DocSpec can describe just a data structure, without forcing any formats.
I had exactly the same thoughts but later turned out not to be ideal:
Would love to hear some feedback on this one :)
I understand the negative bias that XML has in many cases due to verbosity but I need to ask what arguments were used to consider JSON.
AFAIK are there no cross-language libraries that allow easy transformation from JSON data to another format; whereas in XML you can use XPath to get pieces of what you want or use XSL to convert an entire document (or parts of it) to another format such as HTML.
Since the structure files can become rather large it would sound inconvenient to load the JSON into a hashmap and then process it.