| 1 |
// Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
es5id: 15.12.3-6-b-2 |
| 6 |
description: > |
| 7 |
JSON.stringify treats numeric space arguments less than 1 (0)the |
| 8 |
same as empty string space argument. |
| 9 |
---*/ |
| 10 |
|
| 11 |
var obj = { |
| 12 |
a1: { |
| 13 |
b1: [1, 2, 3, 4], |
| 14 |
b2: { |
| 15 |
c1: 1, |
| 16 |
c2: 2 |
| 17 |
} |
| 18 |
}, |
| 19 |
a2: 'a2' |
| 20 |
}; |
| 21 |
|
| 22 |
/* empty string should be same as no space arg */ |
| 23 |
assert.sameValue(JSON.stringify(obj, null, 0), JSON.stringify(obj)); |