1、简单的json
MouseArea { anchors.fill: parent; onClicked: { var json = '{"result":true, "count":42}'; var obj = JSON.parse(json); console.log(obj.count); console.log(obj.result); console.log(obj); } }
打印:
1、简单的json
MouseArea { anchors.fill: parent; onClicked: { var json = '{"result":true, "count":42}'; var obj = JSON.parse(json); console.log(obj.count); console.log(obj.result); console.log(obj); } }
打印: