diff options
author | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2016-12-22 17:54:18 +0900 |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2016-12-22 17:54:18 +0900 |
commit | d65ac66373d37947c1bba80df10e3541b9210aa4 (patch) | |
tree | 97b3a1405edc3a4761c147166ba6d705b97c30f6 | |
parent | 3f93e29104ce0a175bb3d7a5641693c08c7a75e7 (diff) |
Wifi: improve parsing JSON
Change-Id: I6135ad079a1d9d7512b852014dcf124f85cac5e2
Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
-rw-r--r-- | app/wifi/Wifi.qml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/wifi/Wifi.qml b/app/wifi/Wifi.qml index 56dd0df..a2d4fc2 100644 --- a/app/wifi/Wifi.qml +++ b/app/wifi/Wifi.qml @@ -303,9 +303,8 @@ SettingPage { console.log(o.responseText) // translate response into object - var jsonObject = eval('(' + o.responseText + ')') - var jsonObjectNetworks = eval('(' + JSON.stringify( - jsonObject.response) + ')') + var jsonObject = JSON.parse(o.responseText) + var jsonObjectNetworks = jsonObject.response console.log("WiFi list refreshed") //console.log(jsonObject.response) for (var i = 0; i < jsonObjectNetworks.length; i++) { |