Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium ES5
New issue 753 by [email protected]: JSON.stringify does not truncate the
space parameter
http://code.google.com/p/v8/issues/detail?id=753
When called with a non-integer space parameter JSON.stringify does not
truncate the value. This causes an es5conform test to fail.
What will reproduce the problem:
var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
print(JSON.stringify(obj,null, 5.99999)=== JSON.stringify(obj,null, 5));
Expected result:
true
Actual result:
false
The actual output of JSON.strinify(obj,null, 5.99999) is:
{
"a1": {
"b1": [
1,
2,
3,
4
],
"b2": {
"c1": 1,
"c2": 2
}
},
"a2": "a2"
}
that has 6 space indents, it should only have 5.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev