Skip to content

Commit e53f85c

Browse files
Merge v1.20 into v1.x (#1705)
2 parents d9c5af6 + 78fd15c commit e53f85c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/bson/bson-packedarray-fromJSON-001.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ $tests = [
1010
'[ 1, 2, 3 ]',
1111
'[[ 1, 2, 3 ]]',
1212
'[{ "bar": 1 }]',
13+
// JSON objects are accepted iff the keys are valid
14+
'{ "0": "foo", "1": "bar" }',
1315
];
1416

1517
foreach ($tests as $json) {
@@ -34,4 +36,7 @@ Test [[ 1, 2, 3 ]]
3436
Test [{ "bar": 1 }]
3537
0 : 16 00 00 00 03 30 00 0e 00 00 00 10 62 61 72 00 [.....0......bar.]
3638
10 : 01 00 00 00 00 00 [......]
39+
Test { "0": "foo", "1": "bar" }
40+
0 : 1b 00 00 00 02 30 00 04 00 00 00 66 6f 6f 00 02 [.....0.....foo..]
41+
10 : 31 00 04 00 00 00 62 61 72 00 00 [1.....bar..]
3742
===DONE===

0 commit comments

Comments
 (0)