LukeWCS Posted July 15, 2019 Posted July 15, 2019 (edited) 51 minutes ago, Jos said: Aren't they the same? see the dates are. Jos Yes, the dates are the same, but the json.au3 files are definitely different. I mean that post from you: This is not the same json.au3 as the one from the first post. Edited July 15, 2019 by LukeWCS
Developers Jos Posted July 15, 2019 Developers Posted July 15, 2019 mmm.... guess I forgot about that. Updated the first post with this change assuming it is working correctly as I haven't heard differently. 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.
LukeWCS Posted July 15, 2019 Posted July 15, 2019 (edited) @Jos Hmm.. but _Json(2019.07.15).zip is exactly the same as _Json(2019.01.17).zip. ^^ Edited July 15, 2019 by LukeWCS
Developers Jos Posted July 15, 2019 Developers Posted July 15, 2019 21 minutes ago, LukeWCS said: @Jos Hmm.. but _Json(2019.07.15).zip is exactly the same as _Json(2019.01.17).zip. ^^ Yea, you are right, I took it from the wrong place. I've cleaned up the commented old lines a bit and also changed the header version data. Hope it is now the correct/complete version, but the posted testscript is working nicely with this one. 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.
TheXman Posted July 15, 2019 Posted July 15, 2019 (edited) In current (_Json(2019.07.15)b.zip) JSON_Test.au3: @Jos Test5() has an undeclared variable on Line #79: Test6 failed. Not sure if that was intended or not. > ========= Test6 Start ========================= +-> .d.5.4.6.h[0].id =1286 +-> .d.5.4.6.h[0].status =sunny +-> .d.5.4.6.h[0].earth =True +@@ Json_ObjExists($oTemp, "d") = True !!!!@@ Json_ObjExists($oTemp, "d.5") = False !!!!@@ Json_ObjExists($oTemp, "d.5.4") = False !!!!@@ Json_ObjExists($oTemp, "d.5.4.6") = False !!!!@@ Json_ObjExists($oTemp, "d.5.4.6.h") = False +@@ Json_ObjExists($oTemp, "d.5.4.6.x") = False !!!!@@ Json_Get($oTemp, "[0].id") = +@@ Json_Get($oTemp, "[0].id") = ! ========= Test6 Failed! ========================= Edited July 15, 2019 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
LukeWCS Posted July 15, 2019 Posted July 15, 2019 (edited) 2 hours ago, Jos said: I've cleaned up the commented old lines a bit and also changed the header version data. Hope it is now the correct/complete version, but the posted testscript is working nicely with this one. Okay, then I will update now and test my program with the new JSON UDF version. Thanks again Jos. Edited July 15, 2019 by LukeWCS
Developers Jos Posted July 16, 2019 Developers Posted July 16, 2019 (edited) 11 hours ago, TheXman said: Test5() has an undeclared variable on Line #79: Test6 failed. Not sure if that was intended or not. mmm... let me check what is happening .... guess it has been too long ago I use all of this JSON stuff. 10 hours ago, LukeWCS said: Okay, then I will update now and test my program with the new JSON UDF version. Please wait till things are checked! Jos Edited July 16, 2019 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.
LukeWCS Posted July 16, 2019 Posted July 16, 2019 @Jos Alright, release on standby. BTW, I did several tests and found no problems. All .json files are fine. I keep testing. A small problem, not a big deal: there is an undeclared variable $separator on lines 341 and 373.
Developers Jos Posted July 16, 2019 Developers Posted July 16, 2019 4 hours ago, LukeWCS said: BTW, I did several tests and found no problems. All .json files are fine. I keep testing. Understand as the issue is just with test 6 ( test 5 is fixed), which is an change I made a while ago to support sub-objects in Json_ObjExists() and ObjGet(). This is not that commonly used. Just some lack of time at the moment so reverted until that is fixed in the new version. 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.
carlot Posted July 16, 2019 Posted July 16, 2019 Hi together, I am quite new here and wanted to try out a Webdriver Demo. In that Demo the author is using JSON.au3, but I get a compile error. And wherever I have searched I don't find the right JSON.au3 or any JSMN.au3, which I can use. At the beginning of that topic Ward's mentioning, "..I use a machine code version of JSON parser called jsmn.." Hot to deal with it. I am lost with my first step. Can anybody see me down there, if so, any help is much appreciated.
Danp2 Posted July 16, 2019 Posted July 16, 2019 @carlot The version I've been using with the Webdriver UDF can be found earlier in this thread. Here's the link -- Latest Webdriver UDF Release Webdriver Wiki FAQs
carlot Posted July 16, 2019 Posted July 16, 2019 Hi Dan, thx for quick answer. When I click the link of Gabi, there is a self refernce to the same page. Can you tell me what I am doing wrong or give me a link for not talented? Hi together, I am quite new here and wanted to try out a Webdriver Demo. In that Demo the author is using JSON.au3, but I get a compile error. And wherever I have searched I don't find the right JSON.au3 or any JSMN.au3, which I can use. At the beginning of that topic there is a
Danp2 Posted July 16, 2019 Posted July 16, 2019 This link seems to work -- https://www.autoitscript.com/forum/applications/core/interface/file/attachment.php?id=55281 Latest Webdriver UDF Release Webdriver Wiki FAQs
carlot Posted July 16, 2019 Posted July 16, 2019 Yepp works, thank you very much Hi together, I am quite new here and wanted to try out a Webdriver Demo. In that Demo the author is using JSON.au3, but I get a compile error. And wherever I have searched I don't find the right JSON.au3 or any JSMN.au3, which I can use. At the beginning of that topic there is a
LukeWCS Posted July 18, 2019 Posted July 18, 2019 @Jos All right, then I continue to use the version 2019.01.17.
OldGuyWalking Posted July 24, 2019 Posted July 24, 2019 (edited) Update: I reverted to the earlier json.au3 file (01-08-2015) and the code worked fine. I can't figure out why the code change to the json_get function in the 2019 version caused the error I'm getting but since it's a work in progress, my bad for not waiting for a more "official" release. Hello All: I'm trying to read a json file created by a website API. Initially all I've tried to do is read a couple of the values but haven't been able to get past that step. I'm using the json_get function from Json.au3 but keep receiving an @error = 1 that indicates it's a "no specific object" error. I've used code from this site that doesn't appear to require the calling function set a variable as an object before calling the json_get function. In the examples I've seen and I've used below, it seems that the code $object = Json_Decode($data) is sufficient but I have not been able to get that to work. I've tried setting the variable $object = Json_ObjectCreate() before setting $object = Json_Decode($data) but that has not worked either. I've looked at the Json.au3 code and read as much as I can on the site that relates to what I'm trying to do but haven't found anything that works. I've included a test.json file and the first 3 records from the json.dump to show what the structure looks like. I'm just starting to try to figure out JSON and the Json.au3 functions so any help would be appreciated. -Bill Note: uncomment the #include <json.au3> line in the code below. If you don't need to see the full dump file you should comment out or remove the json_dump($data) line of code. expandcollapse popupFunc _JsonTest() ;#include <json.au3> ; Using the 01-17-2019 version Local $data Local $id Local $sTestJSonPath = @ScriptDir & "\test.json" Local $iFileSize = 0 Global $object Local $hOpenFile = FileOpen($sTestJSonPath) If @error Then ConsoleWrite("@error = " & @error & @CRLF & "Could not open " & $sTestJSonPath & @CRLF) EndIf $iFileSize = FileGetSize($sTestJSonPath) $data = FileRead($hOpenFile) FileClose($hOpenFile) ; Dump the json file contents json_dump($data) $object = Json_Decode($data) Local $i = 0 While 1 ConsoleWrite("$i = " & $i & @CRLF) $id = json_Get($object, "[" & $i & "].id") ; Get an @error = 1, which I believe is the "no specific object" error in json_get If @error Then ConsoleWrite("@error = " & @error & @CRLF) ExitLoop EndIf ConsoleWrite('id:' & $id & @CRLF) $i += 1 WEnd EndFunc ;==>_JsonTest test.json Dump.text Edited July 24, 2019 by OldGuyWalking Reverted to earlier json.au3 and problem solved.
ypid-geberit Posted October 4, 2019 Posted October 4, 2019 @Ward @Jos Thanks very much for this UDF! To use this properly in projects, it needs to be clear under which software license you want this UDF to be used. Can you pick one maybe https://choosealicense.com Thank you again! Offtopic: Excuse the double post. I did not find a way to edit the first one?
Developers Jos Posted October 4, 2019 Developers Posted October 4, 2019 Any source posted can be freely used unless specified otherwise. Some recognition about its use is ofcourse a common courtesy. Jos quickbeam 1 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.
ypid-geberit Posted October 4, 2019 Posted October 4, 2019 I would like to discuss this further and to not have such a principle discussion here, I created this thread: @Jos I hope you don’t mind.
loulou2522 Posted October 6, 2019 Posted October 6, 2019 Where can i fin and downlaod json.au3. ? Thanks in advance
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now