Search code examples
jsonparsingappcelerator-mobile

Best way to read contents from a .json link


I've been given a link to a .json file, what is the best way to go about retrieving the contents and then parsing it?


Solution

  • If you are trying to do this in Titanium mobile then...

    1. Fetch the JSON data using Titanium.Network.HTTPClient
    2. Then transform the response to JSON object using JSON.parse()

    Hope that helps