Related to #1162 Currently if JSON with duplicate object keys is passed into `builtins.toJSON`, it will silently drop all but the last value, keeping only the last. This may be surprising, but as this has been consistent reliable behavior that users might depend on, we should test for it. Change-Id: Icc2adefabb161530e7cbfa7330919bab6a6a6964
9 lines
153 B
Nix
9 lines
153 B
Nix
# Duplicate JSON keys should always drop all but the latest value
|
|
builtins.fromJSON ''
|
|
{
|
|
"key": "one",
|
|
"key": "two",
|
|
"key": "three"
|
|
}
|
|
''
|