|
|
|
|
|
by crabbone
959 days ago
|
|
> This works fine This is a very strange way of using the word "fine"... What if the value that lives in the key triggers some functionality in the application that should never happen due to the semantics you just botched by executing it? Example: {
"commands": {
"bumblebee": "rm -rf /usr",
"bumblebee": "echo 'I have done nothing wrong!'"
}
}
With the obvious way to interpret this...So, you are saying that it's "fine" for an application to execute the first followed by second, even though the semantics of the above are that only the second one is the one that should have an effect? Sorry, I have to disagree with your "works fine" assessment. |
|
It's fine, in the sense that a JSON with duplicate keys is already invalid - but the parser might handle it, and i suggested a way (just from reading the stackoverflow answer).
It's the same "fine" that you get from undefined C compiler behaviour.