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
'{"glossary":{"GlossDiv":{"GlossList":{"GlossEntry":{"Abbrev":"ISO 8879:1986","Acronym":"SGML","GlossDef":{"GlossSeeAlso":["GML","XML"],"para":"A meta-markup language, used to create markup languages such as DocBook.","leftOnly":["things"]},"GlossSee":"markup","leftOnly":{"leftKey":"leftValue"},"GlossTerm":"Standard Generalized Markup Language","ID":"SGML","SortAs":"SGML","bothSides":{"leftKey":"leftValue"}}},"title":"S","leftOnly":"hello"},"title":"example glossary"}}',
114
+
'{"glossary":{"GlossDiv":{"GlossList":{"GlossEntry":{"Abbrev":"ISO 8879:1986","Acronym":"SGML","GlossDef":{"GlossSeeAlso":["GML","XML"],"para":"A meta-markup language, used to create markup languages such as DocBook."},"GlossSee":"markup","GlossTerm":"Standard Generalized Markup Language","ID":"SGML","SortAs":"SGML","rightOnly":{"rightKey":"rightKey"},"bothSides":{"rightKey":"rightValue"}}},"title":"S"},"title":"example glossary","rightOnly":"hello"}}',
115
+
],
116
+
'expected' => '{"glossary":{"GlossDiv":{"GlossList":{"GlossEntry":{"Abbrev":"ISO 8879:1986","Acronym":"SGML","GlossDef":{"GlossSeeAlso":["GML","XML","GML","XML"],"leftOnly":["things"],"para":"A meta-markup language, used to create markup languages such as DocBook."},"GlossSee":"markup","GlossTerm":"Standard Generalized Markup Language","ID":"SGML","SortAs":"SGML","bothSides":{"leftKey":"leftValue","rightKey":"rightValue"},"leftOnly":{"leftKey":"leftValue"},"rightOnly":{"rightKey":"rightKey"}}},"leftOnly":"hello","title":"S"},"rightOnly":"hello","title":"example glossary"}}',
117
+
'recurse' => true,
118
+
],
119
+
[
120
+
'objects' => [
121
+
'{"glossary":{"GlossDiv":{"GlossList":{"GlossEntry":{"Abbrev":"ISO 8879:1986","Acronym":"SGML","GlossDef":{"GlossSeeAlso":["GML","XML"],"para":"A meta-markup language, used to create markup languages such as DocBook.","leftOnly":["things"]},"GlossSee":"markup","leftOnly":{"leftKey":"leftValue"},"GlossTerm":"Standard Generalized Markup Language","ID":"SGML","SortAs":"SGML","bothSides":{"leftKey":"leftValue"}}},"title":"S","leftOnly":"hello"},"title":"example glossary"}}',
122
+
'{"glossary":{"GlossDiv":{"GlossList":{"GlossEntry":{"Abbrev":"ISO 8879:1986","Acronym":"SGML","GlossDef":{"GlossSeeAlso":["GML","XML"],"para":"A meta-markup language, used to create markup languages such as DocBook."},"GlossSee":"markup","GlossTerm":"Standard Generalized Markup Language","ID":"SGML","SortAs":"SGML","rightOnly":{"rightKey":"rightKey"},"bothSides":{"rightKey":"rightValue"}}},"title":"S"},"title":"example glossary","rightOnly":"hello"}}',
123
+
],
124
+
'expected' => '{"glossary":{"GlossDiv":{"GlossList":{"GlossEntry":{"Abbrev":"ISO 8879:1986","Acronym":"SGML","GlossDef":{"GlossSeeAlso":["GML","XML"],"leftOnly":["things"],"para":"A meta-markup language, used to create markup languages such as DocBook."},"GlossSee":"markup","GlossTerm":"Standard Generalized Markup Language","ID":"SGML","SortAs":"SGML","bothSides":{"leftKey":"leftValue","rightKey":"rightValue"},"leftOnly":{"leftKey":"leftValue"},"rightOnly":{"rightKey":"rightKey"}}},"leftOnly":"hello","title":"S"},"rightOnly":"hello","title":"example glossary"}}',
125
+
'recurse' => true,
126
+
'opts' => OBJECT_MERGE_OPT_UNIQUE_ARRAYS,
110
127
]
111
128
);
112
129
@@ -120,7 +137,12 @@ private function doDecode($test, $json)
120
137
$out = json_decode($json);
121
138
if (JSON_ERROR_NONE !== json_last_error()) {
122
139
thrownewRuntimeException(
123
-
sprintf('json_decode returned error while processing test "%s": %s', $test, $json)
140
+
sprintf(
141
+
'json_decode returned error while processing test "%s": %s; json =%s',
0 commit comments