我想讀取如下面在QT中顯示的json文件。有人可以建議一種方法來從json對象獲取值並將它們存儲在單獨的容器或數組中,例如test_cell2.CELLS [0]或某種方式,以便嵌套也可以被照顧,並且我可以在解析文件後輕鬆訪問它們QT讀取JSON文件並存儲和重試值
"test_cells2" : {
"CELLS" : {
"cell_0" : {
"prettyName" : "cell_1",
"CELLS" : {
"cell_1" : {
"prettyName" : "cell_1",
"type" : "default",
},
},
},
"cell_1" : {
"prettyName" : "cell_1",
"type" : "default",
},
"cell_2" : {
"type" : "text cell ko",
},
"cell_3" : {
"prettyName" : "cell_3",
"type" : "default",
},
"cell_4" : {
"data" : {
"settings" : {
"EXEC_PARAMETERS" : {
"defaultQueue" : "batch",
"environment" : {
"blabla" : "blabla2",
},
},
},
},
"type" : "parallel_test",
},
},
},
的[如何創建/讀/寫JSON在QT5文件(可能的複製http://stackoverflow.com/questions/15893040/how-to-create-read-write-json-files-in-qt5) –