Open lapo-luchini opened 1 month ago
That is the way JSON parser works, it will replace the key/value pair with last updated pair while parsing JSON.
If you need to use JSON with duplicate key/value pair you might need to look around for customized implementation of parser or need to use regex.
That is not recommended actually.
Just in case you need duplicate key/value pair in your app, it would be better to assign list of values to the key, instead of duplicate pairs.
I have attached a small code snippet, hope it helps 😌
@sanjai0py @lohxt1 this can probably be closed unless bruno plans on implementing JSON parsing any differently.
I have checked the following:
Describe the bug
When trying to send an incorrect JSON with duplicate keys I would either expect that Bruno does check the value and highlights the problem, or that Bruno does no checks and send the value as is. What I instead can see is that the JSON value is mangled by overwriting the duplicate value.
.bru file to reproduce the bug
Screenshots/Live demo link