In ActionScript 2.0 , How can I send HTTP request and get the response in JSON format.

I am using ActionScript 2.0 for my app development. I have checked XML and LoadVars class. These classes by default send/receive data either in XML or name/value pair format. I want to send data in JSON format and receive the response in JSON format. How can I achieve this behavior using AS2.0. I have noticed that AS3.0 has the capabilities to do so. My client platform doesn't support AS3.0. Can anybody suggest a way to achieve this?
Thanks in Advance.

Atlast I am able to find the solution for this problem. In the end solutioin is very simple.
Following steps will help in sending request in JSON format.
1. extend LoadVars class
2. override toString method. (It should return JSON format )
3. Use subclass to send the request.

Similar Messages

  • How to send a request and get a response through xml

    How to send a request and get a response through xml files?

    This is the code that works for me. Hope you find it useful.
         public static String sendHttpGetRequest(String endpoint, String requestParameters){
              String result = null;
              // Send a GET request to the servlet
              try{
                   // Send data
                   String urlStr = endpoint;
                   if (requestParameters != null && requestParameters.length () > 0){
                        urlStr += "?" + requestParameters;
                   URL url = new URL(urlStr);
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestProperty("Accept", "application/xml");
                   // Get the response
                   BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   StringBuffer sb = new StringBuffer();
                   String line;
                   while ((line = rd.readLine()) != null){
                        sb.append(line);
                   rd.close();
                   result = sb.toString();
              } catch (Exception e){
                   e.printStackTrace();
              return result;
         }

  • ABAP need to connect to Webserivice and send a Request and get a response

    Hi All,
    i have a interfaace in SAP HCM, where i need to get data from given tables and convert it into XML and send it to Web service  as a #request, and then latter i need to get a response , where it is sucess or not ,
    I need to know exactly how to create a class in SE80 and what is the prerequiste for that , anyone , thankin g you
    Sridhar

    it as been sloved

  • How can I open a file and get the data inside  file when using  WebStart

    When I use ClassLoader,
    Which methold can I use the read the information inside that file?
    Thanks
    Ryan

    Assuming you are trying to read the jar file.
    http://forum.java.sun.com/thread.jspa?forumID=22&threadID=572955
    rykk

  • How can I parse GPO settings and get the GPOApplyOrder?

    I have created a script that will search all GPO's in the domain and parse only those which have Drive Map settings and writes the information to a .csv file.  I have tried to figure out a way to get the GPOApplyOrder to no avail.  The closest
    I have come to any sort of reasonable output is
    "@{GPOSettingOrder=}", which is better than the nothing I had been getting.  I think it would be really helpful if I could sort on the appy order so I could see the flow of the applied settings.  Here is what I have.
    # ==============================================================================================
    # NAME: GetGPO_DriveMappings.ps1
    # AUTHOR: Mike
    # DATE: 6/17/2014
    # Updated: 7/29/2014
    # COMMENT: This script will get all the GPO's in the domain. It will parse only the GPO's that have drive map settings.
    # The results are written to GetGPO_DriveMappings.csv
    # This script is written to be run from the domain that the GPO(s) is in.
    # NOTE: The script will not perform any group provisioning.
    # ==============================================================================================
    # set Variables and load assemblies
    ImportSystemModules
    Import-Module GroupPolicy
    [void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
    $ScriptPath = "R:\Procedural Instructions\Scripts\Get AD Object Info"
    # Get drive map settings from all GPOs.
    Function Get-DriveMappings
    # File listing the drive mappings via GPO.
    $ExportFile = "GetGPO_DriveMappings.csv"
    # Creates .csv file for logging.
    $Header = "GPO Name,Drive Letter,Action,Apply Order,Drive Path,Group,OU,User"
    Set-Content -Path $ScriptPath\$ExportFile -Value $Header
    $GPO = Get-GPO -All
    ForEach ($Policy in $GPO)
    $GPOID = $Policy.Id
    $GPODom = $Policy.DomainName
    $GPODisp = $Policy.DisplayName
    If (Test-Path "\\$($GPODom)\SYSVOL\$($GPODom)\Policies\{$($GPOID)}\User\Preferences\Drives\Drives.xml")
    [xml]$DriveXML = Get-Content "\\$($GPODom)\SYSVOL\$($GPODom)\Policies\{$($GPOID)}\User\Preferences\Drives\Drives.xml"
    ForEach ( $MapDrive in $DriveXML.Drives.Drive )
    $GPOName = $GPODisp
    $DriveLetter = $MapDrive.Properties.Letter + ":"
    $DrivePath = $MapDrive.Properties.Path
    $DriveAction = $MapDrive.Properties.action.Replace("U","Update").Replace("C","Create").Replace("D","Delete").Replace("R","Replace")
    $GPOApplyOrder = $MapDrive | Select GPOSettingOrder
    $Filters = $MapDrive.Filters
    $FilterOrgUnit = $null
    $FilterGroup = $null
    $FilterUser = $null
    ForEach ($FilterGroup in $Filters.FilterGroup)
    $FilterGroupName = $FilterGroup.Name
    ForEach ($FilterOrgUnit in $Filters.FilterOrgUnit)
    $FilterOrgUnitName = $FilterOrgUnit.Name
    $FilterOrgUnitName = $FilterOrgUnitName -Replace (",",";")
    ForEach ($FilterUser in $Filters.FilterUser)
    $FilterUserName = $FilterUser.Name
    $ExportText = "$GPOName,$DriveLetter,$DriveAction,$GPOApplyOrder,$DrivePath,$FilterGroupName,$FilterOrgUnitName,$FilterUserName"
    Add-Content -Path $ScriptPath\$ExportFile -value $ExportText
    # --End of Function: Get-DriveMappings--------------------------
    # Notifying that the scripted finished.
    Function Script-Finished
    [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
    [Windows.Forms.MessageBox]::Show(“Script completed successfully”,"GetGPO_DriveMappings.ps", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
    # --End of Function: Script-Finished--------------------------
    # Main Code:
    # Execute the functions
    $ErrorActionPreference="SilentlyContinue"
    Get-DriveMappings
    Script-Finished
    $ErrorActionPreference="Stop"
    Thanks to all in advance.

    I am looking for the order in which the drive map settings are applied. Truly the GPOSettingOrder value. I guess was thinking that it was the order that the drives were mapped so that is what
    I named the variable. In the middle of it all it made sense, now with your question, from the outside looking in, it doesn't. My apologies.
    -<ExtensionData>
    -<Extension xsi:type="q3:DriveMapSettings" xmlns:q3="http://www.microsoft.com/GroupPolicy/Settings/DriveMaps">
    -<q3:DriveMapSettings clsid="{8FDDCC1A-0C3C-43cd-A6B4-71A6DF20DA8C}">
    -<q3:Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" bypassErrors="1" uid="{B7F4229B-9A38-4A52-A987-7FB0CA53BF26}" changed="2013-11-19 18:03:50" image="3" status="P:" name="P:">
    <q3:GPOSettingOrder>1</q3:GPOSettingOrder>
    <q3:Properties letter="P" useLetter="1" persistent="1" label="" path="\\---------------------\APPS" userName="" allDrives="NOCHANGE" thisDrive="NOCHANGE" action="D"/>
    -<q3:Filters>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="AND"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    <q3:FilterOrgUnit name="OU=---------------,DC=com" directMember="0" userContext="1" not="0" bool="OR"/>
    </q3:Filters>
    </q3:Drive>

  • How can I deinstall Acrobat DC and get the Acrobat xi back? DC is really bad ..

    the UI is a no go for me. Not for serious work.
    So I want to reinstall the old version!
    xx

    Hi,
    I used the instruction provided by Adobe here, and it works
    https://helpx.adobe.com/creative-cloud/kb/acrobat-dc-uninstalls-acrobat-11.html

  • My old acer laptop will not re install I tunes.  How can I sync my iPad and get the tunes in my iTunes library?

    My old acer laptop will not re install I tunes.  I want to sync my iPad and get my tunes on it from iTunes.  Any ideas?

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • My friend has an iPhone but doesn't use iMessage. How can I send her regular texts with the new iOS 7 update?

    My friend has an iPhone but doesn't use iMessage. How can I send her regular texts with the new iOS 7 update?

    That's because her phone is recognized in the Apple database as an iPhone.  It should eventually convert to SMS but that's above my level of expertise here so hopefully someone else can come along and help you further.  She could just turn on iMessage and solve the problem. Ha!
    Good luck!

  • How can I download itunes when I get the following errors...have installed and uninstalled a dozen times with various fixes...b noir for example and used Revo to clean up..ituneshelper did not install correctly error 7

    How can I download itunes when I get the following errors  ..ituneshelper did not install correctly error 7..I .have installed and uninstalled a dozen times with various fixes...b noir for example and used Revo to clean up.
    This has been a problem for 6 weeks now, I retry when I have time and patience and use my other laptop which is also Windows 7 and runs with no problem.
    Every attempt fails when all seems fine on the desktop and I try to log on to Itunes I get the errors.
    Any help greatly appreciated.
    billymac

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features(Later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (If this won't uninstall press on)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    See also HT1925: Removing and Reinstalling iTunes for Windows XP or HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    Should you get the error iTunes.exe - Entry Point Not Found after the above reinstall then copy QTMovieWin.dll from:
    C:\Program Files (x86)\Common Files\Apple\Apple Application Support
    and paste into:
    C:\Program Files (x86)\iTunes
    The above paths would be for a 64-bit machine. Hopefully the same fix with the " (x86)" omitted would work on 32-bit systems with the same error.
    tt2

  • Hi, I am trying to download IOS7 to my ipad. The programme has locked at the 'Choose a Wif-Fi network' page, a box says 'joining other network' but the page is greyed out and can't move from it.  How can I clear this screen and finish the download. Thanks

    Hi, I am trying to download IOS7 (not sure if it's 1 or 2) to my ipad. The programme has locked at the 'Choose a Wif-Fi network' page, a box says 'joining other network' but the page is greyed out and can't move from it.  How can I clear this screen and finish the download. Thanks

    Hello Den53,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430?viewlocale=en_US
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    After the device has turned off, press and hold the Sleep/Wake button until the Apple logo appears.
    Best of luck,
    Mario

  • TS3276 How do I send an email and get a receipt that they opened it? I have seen this before, but don't know what setting to go to.

    How do I send an email and get a recipt that they opened it?

    Additionally, even if Mail supported it, the recipient would have to allow/consent to sending you the receipt - if I were the recipient, I would certainly not allow it. If you are sending legal or other very important files, use the "return receipt required" feature of US Mail - you will get a receipt that it was accepted with a signature.

  • I had an App on MacBook Air which would cause my computer to be locked. I delted it and reinstalled the App again from the AppStore. Now I am being charged again for the same App. How can I correct this issue and get refund for the double billing?

    I had an App on MacBook Air which would cause my computer to be locked. I delted it and reinstalled the App again from the AppStore. Now I am being charged again for the same App. How can I correct this issue and get refund for the double billing?

    You can't gift it, gifting can only be done from within the store, not from within your library.
    Puchases are considered final but you can try the 'report a problem' link to contact iTunes Support and see if they will refund or credit you : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • How can i uninstall Windows 7 and remove the partition?

    how can i uninstall Windows 7 and remove the partition?  white unibody late 2009.  i cannot seem to find bootcamp either :/

    Open the Boot Camp Assistant in the /Applications/Utilities/ folder and use it to restore the drive to a single partition setup. If it's not there, use Pacifist to extract it from your install DVD and run the combo updater for your OS version.
    (79308)

  • How can i repair my logo and make the fill transparent, in ID CC?

    I am first time user for InDesign CC how can i repair my logo and make the fill transparent, in ID CC?

    No I did it InDesign CC, ill try illustrator, but I was able to fill in with a light grey that made the other parts of logo stand out, so I may just leave it that way.

  • How could we delete transport request and task(the released one)

    Hello
    We have a released transport task(not request). Transport request is not released.
    How could we delete transport request and task(the released one). Namely we would not like to transport it to production

    Hi, never delete directly in table.
    There are more tables which depends each other...
    Here, you can find nice example how to do it: Help on ABAP: Few Tips for Transport Request Manipulation
    Using program: RDDIT076 and changing status.

Maybe you are looking for

  • No longer able to drag and drop to edit pdf

    I have adobe acrobat 11.0.06 and Mac OS 10.9.1.  I use to be able to add files to an existing pdf via the "Page Thumbnails"view. I would drag the files and drop them there and "bingo" the pages would appear where I dropped them and in the correct ord

  • XSQLRequest ,XSLProcessor , XSLStylesheet  Memory Problem

    Solaris & NT. Using the following processor combination to generate xmldocuments for an output stream, We are experiencing what appears to be a over caching of xml objects or objects not being garbage collected after use. (JProb on OC4J analysis) The

  • Aperture 3: problem when re-processing raw files to the latest converter

    After converting to Aperture 3, many of my Nikon D80 raw files are coming up with the message: "This photo was adjusted using an earlier version of Apple's RAW processing." Aperture 3 offers a "Reprocess" button next to the message. Every time I clic

  • Lag on DAQmx continuous Outputs?

    I'm trying to use DAQmx to set up an output that is "continuous".  By that I mean that it would keep going without stop but, I want to be able to control the magnitude of the signal.  I don't know why but when I try to change the output I get a lot o

  • Enabling SSL on SAP NetWeaver 7.0 ABAP Trial Version

    Hello, I installed the SAP NetWeaver 7.0 ABAP Trial Version and am trying to use the class cl_http_client to GET an xml file over ssl. The method cl_http_client_receive returns error "http_communication_failure", the get_last_error method returns "11