Abdulla060 Posted March 29, 2018 Posted March 29, 2018 Hi all, i need to get data from a json file that was obtained from the api of a video game that i'm playing (the script is used for inventory analysis) however this code example returns an empty response no matter which path i chose #include "json.au3" testfunc() func testfunc() $fileopen = FileOpen(@ScriptDir & "/testdata.json") $fileRead = FileRead($fileopen) $testvar = Json_Decode($fileRead) $sFinaldata = json_get($testvar, 'items[0].verified') MsgBox(0,"", $sFinaldata) EndFunc i used this exact script on other json file examples and it worked just fine i tried checking my file suing this site https://jsonlint.com/ and it showed that it is a valid json file and yet i still cant get my data from it testdata.json
Developers Jos Posted March 29, 2018 Developers Posted March 29, 2018 (edited) 27 minutes ago, Abdulla060 said: json file that was obtained from the api of a video game that i'm playing Look at json_dump and while you are looking for stuff, also read our forumrules, particularly the part about game interaction. Jos Edited March 29, 2018 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts