|
|
|
|
|
by Lazare
5168 days ago
|
|
But the point is that if you have comments in your JSON, the first time you do some sort of "for key in data" to transform the data and spit it back out, the comments are gone; you may never even realize they were there to start with. If you do that with the metadata explicitly stored as a separate key-value pair in your blob, then this doesn't happen; the meta data is never silently discarded when you, say, take all the key value pairs in the JSON blob and send them out down the wire to a client. If you want to strip the meta-data, you have to do that. I know this isn't Python, but I think the Zen of Python is on point here: "Explicit is better than implicit." |
|
If you've stored comments as regular data, you haven't lost them but you've just transformed them in the output.