From d65ac66373d37947c1bba80df10e3541b9210aa4 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Thu, 22 Dec 2016 17:54:18 +0900 Subject: Wifi: improve parsing JSON Change-Id: I6135ad079a1d9d7512b852014dcf124f85cac5e2 Signed-off-by: Tasuku Suzuki --- app/wifi/Wifi.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app') 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++) { -- cgit 1.2.3-korg