Jump to content
Sign in to follow this  

Json help

Recommended Posts



I'm having a really hard time getting this JSON Library to work. I've attached a valid json file.

Seems like something should be written instead of 0.

#include <json.au3>
#include <json_translate.au3>

$sample_json_file = "c:\temp\sample.json"
$var = _JSONDecode($sample_json_file,'JSON_unpack')
ConsoleWrite($var & @CRLF)

I'm not understanding how the decode function works. Or, it's not working. 

Any advice would be helpful.

Thank you.


Edited by CygnusX1
Fixed a typo


Share this post

Link to post
Share on other sites


employ error checking. add this line right after the line calling _JSONDecode:

ConsoleWrite('@error=' & @error & @CRLF & '@extended=' & @extended & @CRLF)

the result you will see:


so, somewhere inside the UDF, some function set the @error macro to 7. should be fairly easy to find out where that happened. go into the UDF and add some debugging statements.

Edited by orbs

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this