summaryrefslogtreecommitdiffstats
path: root/app/wifi
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2016-12-22 17:54:18 +0900
committerTasuku Suzuki <tasuku.suzuki@qt.io>2016-12-22 17:54:18 +0900
commitd65ac66373d37947c1bba80df10e3541b9210aa4 (patch)
tree97b3a1405edc3a4761c147166ba6d705b97c30f6 /app/wifi
parent3f93e29104ce0a175bb3d7a5641693c08c7a75e7 (diff)
Wifi: improve parsing JSON
Change-Id: I6135ad079a1d9d7512b852014dcf124f85cac5e2 Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Diffstat (limited to 'app/wifi')
-rw-r--r--app/wifi/Wifi.qml5
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++) {