3 ms·
Well, you can do something like: { "comment-version": "Tells the version of the file", "version": "1.0.0-*", "buildOptions": { "comment-deb
by elcct 10y ago
Well, 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.