What I am trying to do is read from a text file that has data that has been pulled from a website but excluding the html tags. The data on the text file starts with this
Code:
{"status":{"code":"200","message":"success","errors":[],"debug":{"build":"1.0","serverName":"pjbb13lax01us.prod.auction.local","duration":80}},"result":{"assets":{"total":103,"count":103,"offset":0,"asset":[{"item_id":
After the second [ starts the data {"item_id" I have looked over some of my old code that Stan has help with in the past and I know what I need to do but i'm not sure how to not over flow a variable with all the text data. I'm reading the sample data I'm testing which only contains 2 records. Here is what I am trying to do
Code:
dim ocnt as N
ocnt = 1
data = file.open("C:\Apps\ma.txt", FILE_RO_SHARED)
'data = file.to_string("C:\Apps\ma.txt")
while .NOT. data.eof()

address =extract_string(data,"property_address\":","\,",ocnt)
city = extract_string(data,"property_city\":","\,",ocnt)
state = extract_string(data,"property_state\":","\,",ocnt)
zipcode = extract_string(data,"property_zip\":","\,",ocnt)
ocnt = 1+1
end while
data.close()
I know that isn't correct I need to read each block and then extract address --to zip then on to the next block.
I will post as I continue to work on a solution on my own hope I can figure this out I understand the steps now just to find the correct xbasic coding. I'm thinking stringscanner might be what I need to use I will soon find out.