Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.0 Beta4
-
9e83d268d6e0bd492fafad823a47cef57b7916c5 (qt/qtbase/5.15.0)
Description
Erase function of QJsonObject delete the wrong (key, value) pair in 5.15.0 beta4, It is working fine with 5.14.x.
Please refer to the attached sample where a test.json is parsed using QJsonObject. On erasing the pair with key as "xyz", It deleted the wrong pair with key as "test1".
{ "Arr1": [ { "Count": 1, "Arr2": [ { "xyz": "data2", "test1": "data1", "Arr3" : [ { "abc": "data3", "test2" : 1 } ] } ] } ] }
Output in Qt 5.15.0 :
Before erase propData = QJsonObject({"Arr3":[{"abc":"data3","test2":1}],"test1":"data1","xyz":"data2"}) propfind key = "xyz" propfind value = QJsonValue(string, "data2") After erase propData = QJsonObject({"Arr3":[{"abc":"data3","test2":1}],"xyz":"data2"}) Test finished