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]
JSONParse Access Violation Error 14.5
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: JSONParse Access Violation Error 14.5
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: JSONParse Access Violation Error 14.5
Hi,
This issue has been fixed in 14.5.3 which is available to download now.
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: JSONParse Access Violation Error 14.5
This works Great
Takes about 1 min to convert 8K items vs 2 hrs in legacy mode.
Thanks!!!

Takes about 1 min to convert 8K items vs 2 hrs in legacy mode.
Thanks!!!
