4 ms·
Or you can do this: config = { "version": "1.0", "comment": "JSON has comments too!" }
by wisty 13y ago
Or you can do this:
config = {
"version": "1.0",
"comment": "JSON has comments too!"
}
- jawngee 13y agoI hope you're joking.
- kgabis 13y agoWhy? It's a valid solution.
- lowboy 13y agoMixing metadata in with data isn't ideal.
- yxhuvud 13y agoMixing metadata with a serialization format isn't ideal. Want metadata? Use a markup language.
- zimbatm 13y agoBut metadata is also data.
- coldtea 13y agoActually it is. Then you can treat them the same way. And since it's a configuration format, you know what keys are accepted and what keys are for the metadata, and thus won't clash.
- arunoda 13y agothis is what is recommended for package.json in node. Specially "//" as the key.
- mpyne 13y agoThat's what we did for some of our KDE build infrastructure metadata, since there was no way I was using YAML if I could avoid it for something this simple.