JSONParse Access Violation Error 14.5

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
cf1flyboy
Newbie
Posts: 7
Joined: Thu Nov 17, 2016 4:21 pm

JSONParse Access Violation Error 14.5

Post by cf1flyboy » Wed Dec 12, 2018 2:39 pm

While Testing the new JsonParse function changed in version 14.5, I get an Access Violation Error on my current price field.
But when I remark out current price and switch to the legacy mode the script reads current price fine.
am I missing something when pulling current price???

[snippet=]
//JSON FILE
/*
MyJSON:
{"getallpricesresult":{"items":{"item":[{"itemid":"0002B","description":"0002B ABSOLUT GRAPEFRUIT SEQUIN","category":"Vodka","statuscode":"25","proof":80.0,"ounces":"25.40","upc":"835229010505","currenteffectivedate":"10/1/2018 12:00:00 PM","currentprice":15.99,"nexteffectivedate":"","nexteffectiveprice":0.0}
,{"itemid":"0003B","description":"0003B ABSOLUT LIME SEQUIN","category":"Vodka","statuscode":"25","proof":80.0,"ounces":"25.40","upc":"835229010499","currenteffectivedate":"8/1/2018 12:00:00 PM","currentprice":17.99,"nexteffectivedate":"","nexteffectiveprice":0.0}
]}}}
*/

//==READ JSON
LabelToVar>MyJSON,sJSON
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['itemid'],result
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['upc'],result1
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['description'],result2
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['category'],result3
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['statuscode'],result4
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['proof'],result5
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['ounces'],result6
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['currenteffectivedate'],result7
JSONParse>sJSON,$['getallpricesresult']['items']['item'][*]['currentprice'],result8
LET>K=0
LET>X=0
//LET>JSONPARSE_LEGACY=1
LABEL>READJ
Let>k=k+1
IF>K>RESULT_COUNT,DONE
MSG>%K%
//JSONParse>sJSON,getallpricesresult.items.item[%k%].proof,result5
//JSONParse>sJSON,getallpricesresult.items.item[%k%].currentprice,result8
LET>X=K
LET>I1=result_%k%
LET>I2=result1_%k%
LET>I3=result2_%k%
LET>I4=result3_%k%
LET>I5=result4_%k%
LET>I6=result5_%k%
LET>I7=result6_%k%
LET>I8=result7_%k%
LET>I9=result8_%k%
Let>LINE=%I1%|%I2%|%I3%|%I4%|%I5%|%I6%|%I7%|%I8%|%I9%
MSG>%LINE%
GOTO>READJ
LABEL>DONE
[/snippet]

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: JSONParse Access Violation Error 14.5

Post by Marcus Tettmar » Wed Dec 12, 2018 8:44 pm

We've identified the problem and working on a resolution.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: JSONParse Access Violation Error 14.5

Post by Marcus Tettmar » Thu Dec 13, 2018 9:53 am

Hi,

This issue has been fixed in 14.5.3 which is available to download now.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

cf1flyboy
Newbie
Posts: 7
Joined: Thu Nov 17, 2016 4:21 pm

Re: JSONParse Access Violation Error 14.5

Post by cf1flyboy » Thu Dec 13, 2018 1:04 pm

This works Great
Takes about 1 min to convert 8K items vs 2 hrs in legacy mode.
Thanks!!!
:)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts