Problem in JSON decoding in the device... build by premium version...

I am creating a game that requires to get .json file from our server for updates. it works fine with the simulator but i got problem in the device when we finished to build it and test it on the device. i think it did not read or open the .json file because it did not proceed to the next method.

we test it to build in our old version of corona and it is a trial version. we try to run our game and it works fine on it.

my question now is that, why in our premium version of corona sdk got this kind of problem? and how can i solve this problem?

do anyone can help me about my case?

thanks in advance …

this is my code look like :

[code]
local jsonFile = function(file)
local path = system.pathForFile( file,system.TemporaryDirectory)
local file = io.open( path, “r” )
if file then
contents = file:read( “*a” )
io.close( file )
end
return contents
end
local jsonUrl = “http://sample.com/api/getjsonfile/
local path = system.pathForFile( jsondata, system.TemporaryDirectory )
local myFile = io.open( path, “w+b” )

– Request remote file and save data to local file
http.request{
url = jsonUrl,
sink = ltn12.sink.file(myFile)
}
local location = jsonFile( jsondata )
local t = json.decode(location)


[/code] [import]uid: 142834 topic_id: 27229 reply_id: 327229[/import]

What version of Corona do you believe this was working in and in which version are you now testing that it is not working in? Happy to test this. [import]uid: 52491 topic_id: 27229 reply_id: 110620[/import]

CoronaSDK-2012.825 [import]uid: 142834 topic_id: 27229 reply_id: 110629[/import]

I assume that is the current version that it isn’t working in - what version WAS it working in? 704? Or something more recent? [import]uid: 52491 topic_id: 27229 reply_id: 110651[/import]