I am very new to json in Xojo so I need some newby help.
I am trying to parse a json response. In ContentReceived, I am trying to parse the json in “content”.
I need to get the values in “value”:PLUG-SPARK and “itemprice”:1.3
I tried this.
var a() as variant
a = ParseJSON(content)
but I get an error
Here is the long json string that is returned in “content”.
{“errors”:,“pa”:[{“inv”:[{“qty”:1,“wh”:1}],“item”:{“attributes”:[{“name”:“Description”,“value”:“PLUG - SPARK”},{“name”:“Description2”,“value”:“”},{“name”:“IsHAZ”,“value”:“False”},{“name”:“IsNON”,“value”:“False”},{“name”:“Backorderable”,“value”:“True”},{“name”:“Weight”,“value”:“0.16”}],“itemnumber”:“TSA/SY188T”},“itemerror”:null,“price”:{“coreprice”:0,“currency”:“USD”,“itemprice”:1.3,“listprice”:2.05,“qtybreaks”:[{“price”:1.3,“qtycount”:1}]},“reqitem”:{“id”:“TestId”,“itemnumber”:“sy188t”,“quantity”:1,“reference”:“TestRef”,“wh”:1}}],“requestkey”:“Test3”}