on json by http

Sorry, new developer to waterfall

is there any document on via http access json data?

I found a few cpp files when creating extensions webworks but do not know how to use it.

Thank you

You can use the class JsonDataAccess, QVariantList, QVariantMap, QVariant access JSON file structure: https://developer.blackberry.com/native/documentation/cascades/device_platform/data_access/working_w...

Once you set your JSON to QVariantList, there are a lot of discussions in this forum who have excellent explanations on how to access the child elements and properties.

Tags: BlackBerry Developers

Similar Questions

  • Help with several ListItemComponents with the JSON data

    I can't find a way to use a specific ListItemComponent for a specific type of element JSON. I can only find examples for XML data that works. But I tried to do the same thing for JSON and does not work.

    The examples that I found (nothing for JSON):

    Basically, I want to display a specific ListItemComponents for the JSON element in a table. One of the Photos, videos, etc...

    QML

    listItemComponents:
    [
        ListItemComponent
        {
            type: "photos"
    
            content: Container
            {
                horizontalAlignment: HorizontalAlignment.Fill
                background: Color.Green
    
                Label
                {
                    text: ListItemData.text
                    horizontalAlignment: HorizontalAlignment.Fill
                }
            }
        },
        ListItemComponent
        {
            type: "videos"
    
            content: Container
            {
                horizontalAlignment: HorizontalAlignment.Fill
                background: Color.Yellow
    
                Label
                {
                    text: ListItemData.text
                    horizontalAlignment: HorizontalAlignment.Fill
                }
            }
        },
        ListItemComponent
        {
            type: "status"
    
            content: Container
            {
                horizontalAlignment: HorizontalAlignment.Fill
                background: Color.Blue
    
                Label
                {
                    text: ListItemData.text
                    horizontalAlignment: HorizontalAlignment.Fill
                }
            }
        },
        ListItemComponent
        {
            type: "link"
    
            content: Container
            {
                horizontalAlignment: HorizontalAlignment.Fill
                background: Color.Red
    
                Label
                {
                    text: ListItemData.text
                    horizontalAlignment: HorizontalAlignment.Fill
                }
            }
        }
    ]
    

    JSON

    [
        { type : "photos", text: "this is a photo" },
        { type : "video", text: "this is a video" },
        { type : "status", text: "this is a status" },
        { type : "link", text: "this is a link" }
    ]
    

    This works fine if I add it to a ListView dataModel. GroupDataModel or ArrayDataModel.

    Can someone please help? Thank you very much in advance!

    Redefine the itemType for the data model.

                    // Item type mapping
    
                    function itemType(data, indexPath) {                    if (indexPath.length == 1) {                        return 'header';                    } else {                        switch (Number(data.type)) {                            case 0:                                return 'this_item';                                break;                            case 1:                                return 'that_item';                                break;                            case 2:                                return 'another_item';                                break;                            case 3:                                return 'whos_item';                                break;                            case 4:                                return 'item_item';                                break;                            case 5:                                return 'yet_another_item';                                break;                            case 6:                                return 'last_item';                                break;                        }                    }                }
    

    DataModel is a GroupDataModel

    dataModel: {StatisticsModel}

    Class ExampleModel: public bb::cascades:GroupDataModel

  • How to use json webservice in blackberry waterfalls

    1. how to use json WebService in the cascades of blackberry.

    2.i need to get data from url link in the qml page. give suggession with examples if possible.

    my link of web service contains the type of array

    for example: {'address': ['zone': 'RCS', 'city': 'ght']}

    Description:

    JSON link--> http://192.168.1.251:410/Mobile/Service1.svc/english/Category?CountryID=1

    using link above please ask how to recover data from json webservice cascading... I need answer to the method of waterfalls...

    Finally, I am me anser for service web json

    Response---> http://stackoverflow.com/questions/18598886/how-to-use-json-webservice-in-blackberry-cascades/186230...

  • Absurd change of Adobe player 11: JSON is com.adobe.serialization.json.JSON, but the names DIFFER from the method!

    I guess put an internal JSON interpreter was a brilliant idea.

    But stupidly implemented by Adobe:

    all of the previous code relied on com.adobe.serialization.json.JSON

    Methods were:

    JSON.encode (o: Object);

    JSON.decode (s:String);

    Now, there's a JSON parser internal, much more quickly, which is great...

    But ALL the code written previously breaks.

    new methods of the class are:

    JSON.stringify (o: Object);

    JSON.parse (s:String);

    Result:

    All code written for player 10 does not compile.

    While keeping the method the same names, would have done work seamlessly on both versions. (10 player would have used the imported class, while the Player 11, she uses the inner class)

    Is there a logic, that I can't see behind this apparently dumb choice?

    Thank you

    You can find a solution to the conflict here JSON:

    http://www.pippoflash.com/index.php/2012/06/20/Flash-Player-10-and-Flash-Player-11-JSON-js sur-conflit-resolved.

  • HttpService with JSON server - help please

    Hello!
    I'm moving in return a JSON object in flex using HttpService. The scenario is like this - using HttpService I call an action as I am using Struts 2.0. This action is supposed to return a string in JSON format. When I pass in return the data as XML data is displayed correctly with the structure hierarchail. But when I pass the JSON string back it does not display anything.

    This is the call to the server
    < mx:HTTPService id = "srv" url = "... / myaction/getSomeData.action"/ > "

    the value of srv is coming with a null value.

    I am a total newbie to Flex.

    Thanks for any help in advance.
    Rohit

    First, you will need to read your response as a simple text by specifying resultFormat = "text" in your service:

    http://192.168.103.128:8081/ManageMe/manageme/generateXMLForGantt.action"resultFormat ="text"/ >

    Now in your result event you read the answer in the form of simple text:

    var rawData:String = String (event.result);

    Of course, now, you must encode the string as a JSON object. Flex is not a built-in JSON encoder/decoder. So here's the library done by Adobe/Flex people than hanldes JSON:

    http://code.Google.com/p/AS3corelib/

    Once you have downloaded this library and you copied into your lib foleder, the following line would look like:

    try {}
    Alert.Show (rawData);
    var o: Object = JSON.decode (rawData);
    Alert.Show (o ['baselineEnd']);

    }
    {catch(e:Error)})
    handle the error
    }

    should work!

    ATTA

  • Restoration of damaged or deleted bookmark

    Hi, I've just accidentally deleted my entire partition I save the bookmark backup (.json). I managed to recovered it in a program, but he seems incapable of treating Firefox. And my Sync data seem to have disappeared too. And I don't know anything about json file (Yes, I did some research but it seems that it is beyond me.) I guess that someone can help me?

    JSON recovered: http://d-h.st/OY7

    Thank you

    Rapier-


  • Google is annoying me with research

    People, when I go to Google and start typing in the search for words, I get this funny applicant on the screen.

    I'm sure it's not malicious, but I don't know what to do with it.

    The applicant says something like:
    You chose to open the search which is an application/json
    of https:google.com.au
    What should firefox with this file?

    Buggered if I know.

    What is it? Why do I need?
    Why is it proposed to me?

    Sorry people. 'They' seem to like throwing these annoying now and then things against me, and as I'm not just ofe (spelling?) with the net is really boring get these errors/problems.

    I recommend that you try to disable the plugins addons and unnecessary as they could be at the root of the problem. You must also upgrade to the latest version.

  • Sometimes, when I try to do a Google search, many pop-up windows 'Search the opening' appear. I can't keep typing in my search until I closed all these pop-up windows. How can I stop the EVER arise again?

    They are small pop up windows. When I start to enter key words to search for, very often these things pop up and not a single one. A lot of them. Popping each other on the other on the other. I can't enter anything again in the Google search box until I closed all the windows. And, usually, the ones many of them will appear again when I enter my search in the next letter.

    This is what it says in the pop up box:

    Along the top it says in clear blue margin 'search for opening.

    Under the foregoing and in a white box, he said:

    "You have chosen to open.

    [a symbol Windows] search

        which is a: application/json
        from: https//www.google.com
    

    Then on the sketch of an inner box, it reads "that should Firefox do with this file?" and it gives the following options:

        Open with ["Browse" button]
        DownThemAll!
        Save File [This one is checked as the default]
    

    Then a check box with the text next to it: "cela automatically for files like this in the future.

    Under this is a button 'OK' which is in gray and cannot be controlled and one button 'Cancel' which may be. I have never done but used the 'X' at the top right of the box to close this window.

    Now I see that I have limited options for "Happen" for the frequency. It is not every time that Firefox is open, but it is MUCH more common than 'a few times a week'. More like several times a day.

    I erased the Max, disabled all extensions and then restarted my computer. I tried to raise the problem with the Google search and it didn't happen (yet). I then re-enabled only the modules that really make me more easy life on the net, and once again, the problem has not (yet) surface.

    I don't the tag as resolved for a few more days to be sure it is resolved.

    Thanks for the help! I hope it's resolved now.

  • CreateJS / Preloadjs - download image spritesheet error

    I use the CC lead to generate a file with a few images. These images are in a single spritesheet.

    In the HTML file is obtained, I changed the location of the js files and images.

    My HTML file is at the following address

    http: //localhost/web/index.html

    My js file and the images are at the following address

    http://localhost/evolua/Midias/Atividades/2/2.js

    http://localhost/evolua/Midias/Atividades/2/images/B02A10_Canvas_atlas_.JSON

    http://localhost/evolua/Midias/Atividades/2/images/B02A10_Canvas_atlas_.PNG

    In the init method of the index.html file, I put the LoadQueue class basePath as http://localhost/evolua/midias/atividades/2/parameter.

    In this way, both the B02A10_Canvas_atlas_.json file, for example, file

    B02A10_Canvas_atlas_.png be downloaded from the correct location. The basePath is defined in the Preloadjs documentation.

    The problem is that the image file does not load. Here, a filter network Chrome print.

    Image 1

    Imagem baixada.PNG

    Image 2

    Imagem nao baixada.PNG

    As you can see, first of all, the image is downloaded from the correct location. Then we're looking for at http: //localhost/web/images/B02A10.png

    And the file does not work. The image is not found.

    To reproduce this problem, simply change the js files and assets generated by Animate to another folder where the HTML file server will run.

    Then pass the parameter of the LoadQueue class in the method init, the address of the place where the js files and assets.

    Thank you.

    Hello @kdmemory,

    I posted the same question in a discussion about referential PreloadJS and got a response. It seems that corrects this problem. I did have the chance to test since implemented an alternative method in my application.

    It is the address of the discussion on GitHub:

    Problem with LoadQueue basePath · Number #193 · CreateJS/PreloadJS · GitHub

  • apex_web_service.make_rest_request: passing parameters and the type of content

    Don't know if I'm missing something, but should this API show the content type (application/x-www-url-formencoded) when there are values for the p_parm_name and p_parm_value parameters.

    The example in the docs is a Yahoo API. I'm not sure that an individual (see: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_web_service.htm#BABEDJHJ), and I think that it requires an appid (yahoo account), so I went with the example here:

    http://developer.Yahoo.com/YQL/guide/YQL-code-examples.html#yql_php

    If I run the following from a file html on my desktop, it works:
    <form method="POST" action="http://query.yahooapis.com/v1/public/yql">
    
    <input type="hidden" name="q" value="select * from upcoming.events where location='San Francisco' and search_text='dance'"></input>
    <input type="hidden" name="format" value="json"></input>
    <input type="submit"></input>
    
    </form>
    In other words, it returns a JSON result.

    The raw data of HTTP are as follows:
    POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
    Host: query.yahooapis.com
    Connection: keep-alive
    Content-Length: 110
    Cache-Control: max - age = 0
    Origin: null
    User-Agent: Mozilla/5.0 (X 11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11
    Content-Type: application/x-www-formulaires-urlencoded
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip, deflate, sdch
    Accept-Language: en-, FR; q = 0.8, fr; q = 0.6
    Accept-Charset: ISO-8859-1, utf-8; q = 0.7, *; q = 0.3

    q = select +upcoming.events+where+location%3D%27San+Francisco%27+and+search_text%3D%27dance%27 & format = json >

    However, running the following returns nothing: (nothing, nothing of which depends on the parameters passed in)
    set serveroutput on
    
    declare
    
    l_c CLOB;
    
    begin
    
    
      l_c := apex_web_service.make_rest_request(
        p_url => 'http://query.yahooapis.com/v1/public/yql',
        p_http_method => 'POST',
        p_parm_name => apex_util.string_to_table('q:format'),
        p_parm_value => apex_util.string_to_table('select * from upcoming.events where location=''San Francisco'' and search_text=''dance'':json'),
        p_proxy_override => 'http://192.168.1.3:8888');
    
      dbms_output.put_line(substr(l_c, 1, 4000));
    
    end;
    Raw data from HTTP:
    POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
    Host: query.yahooapis.com
    Connection: Keep-Alive
    Content-Length: 106
    Connection: close

    q = 2 Select + % + of + coming % 2Eevents + where + % 3D 'San + Francisco' + and + % 3D search_text 'dance' & format = json >

    I note that one key difference is that content type is not defined in the web service API.

    It was just to test a public service. I note that the foregoing has slighty different encoding request (percentage of tanks). However, I experienced the same behavior on a procedure that I wrote (I can also give this example of test cases if you wish), which is where I first noticed the issue.

    Using utl_http and affecting the type of application/x-www-url-formencoded content, does not solve the problem. However, just thought I'd see the possibility of using the service API Web that is made available.

    The example is in the valid docs, or am I missing something obvious?

    It's Dev days on ApEx 4.1 on the virtual machine in the RTO.

    Thoughts?

    I had a similar problem:
    apex_web_service.make_rest_request packaging missing header parms

    I endedup an SR for Oracle to open. I discovered that the headers (content-type) are defined in global variables before calling apex_web_service.make_rest_request.

    See http://docs.oracle.com/cd/E17556_01/doc/apirefs.40/e15519/apex_web_service.htm#autoId4 for a description of headers and cookies.

    I endedup have to add the following to my code before apex_web_service.make_rest_request:

    apex_web_service.g_request_headers (1) .name: = "Content-Type";
    apex_web_service.g_request_headers (1) .value: = ' application/xml ';

    Once I did, my service works. Odd. Not sure why they did it this way because their internal packages use parameters of the header, but the wrappers do this way, I guess.

    I hope this works for you!

    Jennifer

  • Any idea on how to create tabs?

    Hello

    I have a project and I want to create tabs to contain different content based on categories. Any ideas how I could do?

    Thanks in advance,

    Rafael Carignato

    Here's an example on how to use yepnope and also the user interface for the accordion, this time.

    https://www.box.com/s/gbzuu9c9tupp120lsfnq

    The extent of loading anything, I don't see why not.

    I didn't use xml but I used json. This would probably work too.

    Here is a link on how to use json:

    https://www.box.com/s/ixhuugw9wgjdyowqsruu

  • How can I add a box of comments testimonials on my website?

    I'm currently almost finished my site, I want to add a comment box in my footer so that visitors can leave testimonials on my company.

    I would like the data they enter to automatically appear in another div and fade in and out.

    So basically two divs different one that contains the comment box and the other who travels all the testimony of one at a time and goes off to.

    The only problem is that I have no idea where to start.

    Can someone tell me each topic entails and what I should reference to find that began and ended. As I said that I know how to build a basic site, but I don't know anything about adding a comment box or who came to view the data in another div automatically and cycling through them all.

    This site at the bottom of the page has a display similar to what I think offshore, but isn't that the comment box, but that's essentially what I'm trying to find a way to, customer quotes fade in and out. I would like to just another section next to it for customers to add comments and that the automatically updated list at day and do scroll through them that this site is made

    So if someone could just explain what are the topics I should be research specifically, I'd be very happy.

    http://www.Filesonic.com/file/45975527/v9.1.157.cracked-Noy.part1.rar http://www.vsplash.com/

    What you need, it's using a library such as Jquery and script on the server side.  You need scripts server to send the information to a database to be saved (assuming you want to keep the comments) and then JQuery and javascript will treat and write in the page.  I won't scare you too much, but this is not a topic for beginners because there is interaction between languages.  I've provided the 2 links below for reference:

    http://NET.tutsplus.com/tutorials/PHP/asynchronous-comments-with-jQuery-and-JSON/

    http://www.99points.info/2010/07/Facebook-style-wallpost-and-comments-system-using-jQuery-Ajax-et-PHP-reloaded /.

  • How to analyze Javascript Object Notation in Extendscript?

    I noticed in the Image of Mr. processor Brown the following code:

    dialogResource = "dialog {text:"Image Processor", limits: [100, 100, 480, 540],}".

    that is fundamentally affecting the rating object to the variable dialogResource.  Then later in the script you see:

    mainDialog = new window (this.dialogResource);

    Which means Window() takes the notation object and creates a window object to use.  It also means that the rating of the object is being analyzed.

    There is another post that allows you to use the Socket() to retrieve the right data out of a Web site (such as a web service), so I'm really interested in downloading JSON and turn it into local objects.

    Any ideas on how to turn valid objects in ExtendScript JSON?

    ExtendScript is just Adobe javascript flavor in order to just eval the json string. You can also use one of the json as http://www.json.org/json2.js analyzers

  • Scalar JSON parsing of the HTTP Client

    Hello everyone, I have been using the HTTP Client to call an API via HTTP GET to get a JSON string.  I want to be able to analyze all the information and data that I get in this JSON string.  I think that the JSON string I get is a JSON scalar and not an array or an object.  It looks like a combination of table and object.  Here is an example of the data that I'll be back:

    {"Measurements": [{"voltageRMS": 120.12,: 121044.295 ' currentRMS ': 11.85, ' totalEnergy '}], 'code': 'OK', 'time': 7}

    I tried to use "JSON unflatten" but it did not work.  I continued to get several errors.  Error 1 was that this path not found in JSON when I put in currentRMS as a string table in the way even though I am following the directions for help.  Error 2, is that I have a different type of data between JSON and LabView.  In one of the LabView examples, it is an array JSON goes to several unflatten JSON and it works fine (as long as it's a JSON array).  However, once I use my JSON scalar, the JSON unflatten function no longer works.

    So, I downloaded some addons and used the JSON API in the LAVA.  I used the JSON API for scalar but kept on getting errors.  One of these errors is that the vi is unable to analyze the data.  I tried with several vi analysis (i.e. timestamp).  I tried to use the JSON array and thus got errors.

    Any advice would be greatly appreciated, I'm completely stuck.  Help, please.  Thank you.

    Even if you have only 1 point in the array, the field of 'measures' is a JSON array - noted in square brackets. Don't forget - the cluster should match the JSON data structure you are trying to decode exactly (not the format you expect!).

    With JSON Unflatten - you can either convert the entire string JSON, or you can draw the elements individually on the way (for example, an XPath in XML).

    Here are some examples:

    In the top example - I unflatten the entire cluster and this will give an array of measures. In the second example, I only remove the "0th" of the measure as a scalar array. Had not added the '0' in the path of the table, the data type / output would have been an array of measures.

  • HTTP POST: Returns a response of login instead of a JSON response page

    Dear all,

    I just glued a snippet of code for HTTP Post where I WRITE a message to multiple parties to the server that will
    Authentication. I expect a response the following JSON. But when I run the present I always LOGIN
    Page in HTML.

    Can someone let me know the problem in the code below...

    Thanks a ton for your help.

    Thank you
    MGR

    / public final class MyScreen extends form {}
    private RichTextField _Output;
    public MyScreen() {}
    Set the displayed title of the screen
    setTitle ("MyTitle");

    _Output = new RichTextField();
    Add (_output);
    addMenuItem (_GetDataAction);
    }
    protected _GetDataAction MenuItem = new MenuItem ("GetData", 100000, 10) {}
    public void run() {}
    String URL = "";
    ServiceRequestThread svc = new ServiceRequestThread (URL,
    (MyScreen) UiApplication.getUiApplication)
    (. getActiveScreen());
    SVC. Start();
    }
    };
    {} public void updateDestination (final String text)
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    _Output.SetText (Text);
    }
    });
    }

    }
    class ServiceRequestThread extends Thread {}

    protected String _URL;
    protected MyScreen _Dest = null;
    protected URLEncodedPostData _PostData = null;
    StringBuffer writer = new StringBuffer();

    {} public void setPOSTData (URLEncodedPostData data)
    _PostData = data;
    }

    public ServiceRequestThread (String URL, display MyScreen) {}
    Super();
    Dest = screen;
    _URL = URL;
    }

    public void run() {}
      
    Try
    {
    String limit = "SATBA";
    String twoHyphens = "-";
    "{String data1 = '{\"IMPORTING\': {\"IN_COUNTRY_CODE\":\"US\'}} ';
    String CRLF = "\r\n";
    Byte [] encrypted = Base64OutputStream.encode ("Userassword".getBytes (), 0, "userassword".length (), false, false);
           
    "Preparing the post data.
         
    Writer.Append ("-" + boundary) .append (CRLF);
    Writer.Append ("Content-Disposition: form-data;") Name = ()-"param\" ")." Append
    CRLF);
    Writer.Append ("Content-Type: text/json;") charset ="+" UTF - 8 ") .append (CRLF);
    Writer.Append ("Content-Transfer-Encoding: 8 bit") .append (CRLF);
    Writer.Append ("request - ID:Abcd123456"). Append (CRLF);
    Writer.Append("request-type:rfc_json"). Append (CRLF);
    Writer.Append ("Function:00163E0136C01EE0AE8B059433A71727")
    . Append (CRLF);
    Writer.Append (CRLF);
    Writer.Append (data1). Append (CRLF);
    Writer.Append("--" + Boundary + "--"). Append (CRLF);
    String string = new String (writer);
                           
    HttpConnection conn1 = (HttpConnection) Connector.open (_URL, Connector.READ_WRITE);
    conn1.setRequestMethod (HttpConnection.post);
    conn1.setRequestProperty ("authorization", "Basic" + new String (encoded));
    conn1.setRequestProperty ("Content-Type", "multipart/mixed; limit =" + limit);
     
    OutputStreamWriter osw is new OutputStreamWriter (conn1.openOutputStream (), 'UTF-8');.
    OSW. Write (String);
    OSW. Flush();
    OSW. Close();
       
    int responseCode = conn1.getResponseCode ();
    If (responseCode == HttpConnection.HTTP_OK) {}
    Given InputStream = conn1.openInputStream ();
    Gross StringBuffer = new StringBuffer();
    Byte [] buf = new byte [4096];
    not read int = data.read (buf);
    While (not read > 0) {}
    RAW. Append (new String (buf, 0, read));
    not read = data.read (buf);
    }
    _Dest.updateDestination (RAW. ToString());
    } else {}
    _Dest.updateDestination ("responseCode ="
    + Integer.toString (responseCode));
    }
    }
    catch (IOException e)
    {
    e.printStackTrace ();
    _Dest.updateDestination("exception:"+e.ToString());)
    }
    }

    }

    Hello

    Thank you very much code was perfectly fine and she is on property rim.public of the file where the

    application.handler.http.AuthenticationSupport has been set to true, and because of this in the fact that he wasn't loggging.

    Now I put it to false, and the correct answer came.

    Thank you very much.

    Best regards

    MGR

Maybe you are looking for

  • 'pirates' url

    I enter the url www.delta.com and I am instantly redirected to Xfinity.com. I cannot go into Delta on Chrome, but not on Safari. Somehow, the address Delta.com was 'hijacked' on Safari. How to cancel it?

  • Vista - error code 08x004230F

    I have Vista pre-installed on my PC HP - has caught the virus in HDD SMART 2008, but it was removed. Now I don't have the tab my ACCESSORIES and no system restore I get error code 08x004230F - something about a shadow? Is it possible to reinstall Vis

  • All shortcuts are broken

    The message I get is: "all the shortcuts are broken, can't access system restore."  What can I do?

  • Dell XPS 8700 - How to install Windows XP on it

    Hello I have read on this forum that it was possible to install Win XP on XPS 8500 and wanted Trailblazers thanks! I was wondering if someone has even tried to install XP on the 8700? I should receive my XPS 8700 with Win 7 Premium on this topic next

  • Session UDP Anyconnect VPN.

    My first time using this service, please be gentle. I have installed recently an anyconnect vpn for a specific application.  My question, if I use the command "see the conn." VPN01 # sh conn | I have 172.18.7.36 UDP outside 172.18.7.36:1123 DMZ_ADM 1