2 Replies Latest reply: Aug 26, 2013 3:55 PM by vikas.saurabh RSS

    Need to retrieve JSON data in asc file

    DougOsborne

      Hi everyone,

       

      In an asc file, I am trying to retrieve some data from a server that uses JSON as its exchange format each time someone connects to a specific application. ( I can't control the exchange format)

      To do that I send a POST using the sendAndLoad method of a LoadVars Object.

      So far I only managed to get the HTTP header. The target object from the sendAndLoad method seems to be empty .

       

      The response format from the server is like this :

       

      {"result":{"uid":"24947431041778945007157724608309","sid":"2082506819603055982775876268396 7"}}   (I got it by doing a POST with cURL)

       

      Since the data doesn't have the "attribute=value&attribute2=value2..."  format, I think I will not be able to get them.

      Does anyone know if it is possible to first get and then parse these data using either ServerSide ActionScript's API

      or another good method .