qminer icon indicating copy to clipboard operation
qminer copied to clipboard

JSON parsing

Open rupnikj opened this issue 8 years ago • 3 comments

Fix how undefined is handled: [undefined] -> [null], {a:undefined} -> {}

rupnikj avatar Jul 22 '16 07:07 rupnikj

What exactly does this issue refer to? Converting V8 Objects to PJsonVal?

blazf avatar Sep 07 '17 21:09 blazf

Yes, its about convertin v8 objects (not strictly JSONs) to PJsonVal. If you send [undefined] you will not end up with [null] PJsonVal. It would be good if we would be consistent with: JSON.parse(JSON.stringify([undefined]))

rupnikj avatar Sep 08 '17 08:09 rupnikj

Btw, both [undefined] and {a:undefined} are not JSON objects, because undefined is not a part of the standard, so it's not that our implementation is wrong...

rupnikj avatar Sep 08 '17 08:09 rupnikj