I have a strange issue with the json file. I created a json file using some code Rob Miracle was kind enough too share that made it easy and straight forward to save the json file and then to load the file in when needed.
I saved the file,after creating a table of integers in a small app I created just for the purpose of creating/recording a series of numbers. 0s and 1s in this case. This app saved the json file into the documents directory of that app in the sandbox. I then I copied that file and stored it in the documents directory of another program where I need the use of that file.
I run this other program in the simulator(for iPad) loading in the data from that json file, and it runs well with no issues. I build the app and transfer it to my iPad to test and it loads up to the play screen, but fails there. It is clearly the json file(or how it has been decoded) that is causing this issue. I think this because if I remove any code involved with the json file it runs just fine on the iPad. It always runs well in the simulator.
Has anyone had issues like this with the json files?
I also during testing on the simulator print the table(loaded with the json file) out in the terminal/simulator window, when running it in the simulator. The table shows all the integers (0s and 1s) as they should be. There are no visible ‘control/format characters’ that I would guess could be an issue.
If I look at the json file directly as it is in the sandbox, it shows a '[ ’ at the start of the file and one at the end of the file… but, as I said, once I loaded a table with the data and print it out the numbers appear as they should and the brackets appear to be ignored(as they should) when it is loaded into the table.
The quirky part is, it runs well in the simulator and fails on the iPad.
Thanks for any help possible.
[import]uid: 35148 topic_id: 27848 reply_id: 327848[/import]