DarkAngel wrote:
AFAIK json comments are just /* comment */
I also though that at first but it does not seem to be in the spec, at least that's what I found by some googling.
DarkAngel wrote:
XML isn't very appropriate for a scripting language either, because strictly speaking, the order that elements are stored in a file is supposed to be irrelevant (XML stores sets of data, not sequences of data).
Yes I know, but it sort of works
DarkAngel wrote:
What about in the long run if all of Horde's XML functionality was moved into a "file to class translation" module (responsible for converting data from disc into internal classes/objects). Then perhaps the file formats (XML/JSON/binary) could be changed with Horde extensions?
I think we should stick to some well-engineered but fixed file formats in Horde. Although I like flexibility, too much of it can hurt. It would become nearly impossible to write tools if everyone uses his own formats (e.g. different material syntaxes using XML or JSON). If someone really requires a different format, it is easy to change the loading code but we shouldn't encourage that. Much of an open source engine like Horde is the community projects and tools around it, so I think we should not do anything that complicates this development.
swiftcoder wrote:
If you are going to move away from XML, I would suggest skipping the intermediate stage of JSON, and moving all the way to YAML.
I would say it is ok to stick with XML for now. Our XML files are not that big and I think they are readable enough. The first example that jimbo brough is slightly unfair since the XML did not contain any indentation. The big advantage is that everyone knows XML and has a parser for it (when creating small tools).
Concerning performance: I started writing my own extremely lightweight XML parser some time ago. It is non-extractive (just stores references instead of copying data) and uses node pools to minimize the number of memory allocations. It should be really fast so I don't expect any performance problems with XML files.