5 ms·
I might be the odd one out since I don't find the XML format that bad. A bit sad when you can't add comments in json like formats. (nobody really uses json5)
by coolgoose 10y ago
I might be the odd one out since I don't find the XML format that bad.
A bit sad when you can't add comments in json like formats. (nobody really uses json5)
- elcct 10y agoWell, you can do something like: { "comment-version": "Tells the version of the file", "version": "1.0.0-*", "buildOptions": { "comment-debugType": "What kind of debug type would you like?", "debugType": "portable", "emitEntryPoint": true } } :D
- snarfy 10y agoThose aren't comments. That's all live data, sent over the wire using up bandwidth and resources. It probably wouldn't matter for this project file, but you really shouldn't do that in json.
- topbanana 10y agoXML comments get sent across the wire too
- jsingleton 10y agoCorrect, but I believe what they may mean is that the data will be parsed at an attempt to deserialize it. This may have unintended side-effects. For example, you have to make sure you don't want to add a property to your POCO with that name now. The wire isn't that relevant here. This is about a config file, not an API. Size isn't too important.
- hood_syntax 10y agoThis can be solved by sanitizing it prior to parsing and removing any property that starts with 'comment'. I know it's not a pretty solution, but it works. It's an additional step, but it might be preferred by some people when it means working with a data format they prefer.
- jsingleton 10y agoSounds like a great way to get a bug report in a few year time (once you've forgotten about this feature) along the lines of: Property names starting with "comment" fail to deserialize. :)
- hood_syntax 10y agoHah, true...
- marxidad 10y agoAt that point, you might as well use normal comments and strip those out prior to sending them.
- jsingleton 10y agoXML is actually fine if used sensibly, and better than JSON in some respects (date format etc.). I think people have a bad taste because of some excessive uses of XML (hello SOAP!) and namespace / schema issues.
- maxxxxx 10y agoI still fail to see in what way JSON is better than XML other than that it's maybe a little prettier and doesn't allow people going crazy like they did with XML schemas. We should have at least replaced XML with something really better. That aside csproj and sln files really suck. I want my good old make files back!
- pjmlp 10y agoNo, I am with you there. I also prefer XML over JOSN any day of the week. It is not only the lack of comments, the tooling and validation as well.