You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writeJsonString function (line 1537) is handling undefined inside array by skipping it, see line 1555. This ruins one of the array's invariants, which is order.
Suppose, if in some system you expect [name, surname, address], then even if surname is undefined or null, you should get ["Mike", null, "Some street"] and not ["Mike", "Some street"].
The text was updated successfully, but these errors were encountered:
pavel
changed the title
writeJsonString handles undefined in array in a wrong way.
writeJsonString handles undefined in an array in a wrong way.
Jul 18, 2014
writeJsonString
function (line 1537) is handlingundefined
inside array by skipping it, see line 1555. This ruins one of the array's invariants, which is order.Suppose, if in some system you expect [name, surname, address], then even if surname is undefined or null, you should get ["Mike", null, "Some street"] and not ["Mike", "Some street"].
JSON.stringify description by Mozilla:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify (section description, 3rd point)
The text was updated successfully, but these errors were encountered: