A strange behavior inherited from the JsonObeject class means that for an existing RootedJsonData object, setting a property by passing an object, in particular a stdClass resulting from json_decode will cause the full object to be stored at that level of the data structure. Validation still works but retrieving the value after setting it will return the same stdObeject, when we would expect any get() to retrieve an array.
By normalizing incoming objects we avoid this inconsistency. See the new testAddJsonData() for examples.
A strange behavior inherited from the JsonObeject class means that for an existing RootedJsonData object, setting a property by passing an object, in particular a stdClass resulting from
json_decode
will cause the full object to be stored at that level of the data structure. Validation still works but retrieving the value after setting it will return the same stdObeject, when we would expect anyget()
to retrieve anarray
.By normalizing incoming objects we avoid this inconsistency. See the new
testAddJsonData()
for examples.