iOS - Hosting JSON file to parse it using URL

Obj-Swift picture Obj-Swift · Aug 29, 2013 · Viewed 11.9k times · Source

I have a .json file with valid data. I want to host it online and use the live url in my app. I tried putting the json file in drop box and tried to verify the json data on http://jsonformatter.curiousconcept.com site but it shows "JSON data URL does not contain JSON data" Is there any other way can I achieve this? Thanks.

Answer

agarie picture agarie · Aug 30, 2013

You can still use Dropbox if you don't want to pay for a hosting provider or if you just want to test your app before paying for one.

To do this, you need to replace the www.dropbox.com part of the URL with dl.dropboxusercontent.com as is said in this Dropbox article.

I'm mainly leaving this answer for the future, as this can be useful for other people (me included).