You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
452 B

/*---
{
"nonstandard": true
}
---*/
/*===
{"foo":3,"bar":2}
===*/
/* If a key appears multiple times, the last value wins.
*
* What makes this test a non-standard one is that we also test that the
* enumeration order is as expected, i.e. the second occurrence does
* not change the enum order (first occurrence defines order).
*/
try {
print(JSON.stringify(JSON.parse('{"foo":1,"bar":2,"foo":3}')));
} catch (e) {
print(e.name);
}