Reorganization of the JSON data

Hi all

I need help, reorganizing the data I receive from a JSON Unflatten.
I have a JSON string of a call to API (JSON unflatten) that contains a name (String), a digital and a channel (also a string).
The JSON Unflatten automatically directs the data it receives in order, the data is provided.  The data is information on the channels.  The problem arises when not all channels are provided.  If out of 12 channels, the JSON receives information on only 4 channels, he ordered the 1 to 4 in the table.  However, 1 may not correspond to channel 1 and can actually be channel 5 and 3 might not correspond to channel 3 so on and so forth.  I want to reorganize the JSON based on reading channel (a channel named canal).  So, if in the table that Channel 4 is actually 12 (based on the channel of the channel, i.e., channel-12), I would link data from Channel 4 to profile 12 in a new table, so that the order of the channels still dependent on chain channel and not according to the order of unflatten of JSON.

Please help as I am running out of ideas on how to solve this problem.

Thank you.

That's what is lying to you?

PS: Try to avoid the multiple index table - it is preferable to use arrays and loops

Tags: NI Software

Similar Questions

  • problems with the JSON data loading

    Hello

    I have follow-up Simon Widjaja (EDGEDOCKS) YouTube lesson for the JSON data loading external. But I am not able to connect at least the console database.

    I get this error: "error avascript in the handler! Type of event = element.

    Content.JSON is located in the folder. Data there are very simple:

    [

    {

    "title": "TITLE 1",

    'description': "DESCRIPTION 1"

    },

    {

    "title": "TITLE 2",

    'description': "DESCRIPTION 2"

    }

    ]

    And here's the code in edgeActions.js:

    (function ($, edge, compId) {})

    Composition of var = Edge.Composition, symbol = Edge.Symbol; alias for classes of edge commonly used

    Edge symbol: "internship."

    (function (symbolName) {}

    Symbol.bindElementAction (compId, NomSymbole, 'document', 'compositionReady', function (sym, e) {})

    external json data loading

    $.ajax({)

    type: 'GET ',.

    cache: false,

    URL: "content.json",

    data type: 'json ',.

    success: function (data) {console.log ("data:", data);},

    error: function() {console.log ("something went wrong") ;}}

    });

    });

    End of binding edge

    (}) ('step');

    End of edge symbol: "internship."

    }) (window.jQuery |) AdobeEdge. ($, AdobeEdge, "EDGE-11125477");

    I tried $getJSON also as mentioned in the youtube video.

    Please note: I do not understand 'something was wrong' also connected.

    I use the free trial version. It is a limitation in the free trial version?

    Well, same question as here: loading external data using ajax

    Cannot run the jQuery file is missing, then $. ajax() or $. getJSON().

    You must add the jQuery file as shown below:

    See: http://jquery.com/download/

    Note: Without loading the jQuery file, you can use these functions: API JavaScript Adobe Edge animate CC

  • DeserializeJSON - is there a limit on the size of the JSON data that can be converted?

    , I have a few valid JSON data which are converted successfully by DeserializeJSON... until it gets to a certain size, or is certainly what seems to be the case.  The breaking point seems to be somewhere in the neighborhood of 35 000 characters... about 35 KB.  When the conversion fails, it fails with a "JSON parsing failure: unexpected end of the JSON string" message.  And if the conversion fails, the JSON data are deemed to be valid by tools like this: http://www.freeformatter.com/json-validator.html.

    So, is there a limit on the size of JSON data can be converted by DeserializeJSON?

    Thank you!

    Thank you, Carl.

    The JSON is presented in its entirety, confirmed by Fiddler.  And it is in fact being recorded successfully to a SQL Server nvarchar field too.  I can validate that saved JSON.

    I'm actually grabbing the JSON to convert directly from SQL Server and your comments / ideas drove me on the path of resolution.

    It turns out that the JSON is truncated before going to the DeserializeJSON command, but it was the attraction of cfquery which was truncated.  The difficulty was to allow the 'long text retrieval (CLOB)"for this data source in CF Admin.  I would never forward or even knew that he had this setting.

    Thanks again for your comments!

  • view the json data in the custom list field

    Hi, I did analysis json and I created the custom list field. Now, I want to display only the data analyzed in my custom list field. I'll post my analyzed data from json and here is the code for my custom list field
    data analyzed.
    I have THREE channels of json and I want to show content tittle and date in the list filed. I'll post the screenshot of my list.

    JSONArray jsnarry = new JSONArray(responce);
                System.out.println("\n--length----- "+jsnarry.length());
                //System.out.println("....................................................=");
                for (int i = 0; i < jsnarry.length(); i++){
    
                    JSONArray inerarray = jsnarry.getJSONArray(i);
                        //System.out.println("\n-inerarray-values----- "+inerarray.getString(i1));
                        String TITTLE = inerarray.getString(1);
                        String CONTENT = inerarray.getString(2);
                        String DATE = inerarray.getString(3);
                                                           System.out.println("TITTLE= "+TITTLE);
                        System.out.println("CONTENT= "+CONTENT);
                        System.out.println("DATE= "+DATE);
    
    }
    

    output

    [0.0] --length----- 2
    [0.0]
    [0.0] -innerarray-length----- 6
    
    [0.0] TITTLE= BJP State President Sanjay Tandon's visit to Amita Shukla's Home
    [0.0] CONTENT=  BJP President Chandigarh Sanjay Tandon at Amita Shukla's Home
    [0.0] DATE= 2013-01-04
    [0.0] ................................................
    [0.0] TITTLE= Sanjay Tandon at mahasamadhi of Satya Shri Sai baba.
    [0.0] CONTENT= BJP Chandigarh President, Sanjay Tandon mahasmadhi of Sri Satya Sai Baba.(Andhra Pradesh)
    [0.0] DATE= 2013-01-13
    

    and my custom list field

           super(NO_VERTICAL_SCROLL);
    
             String TITTLE="TITTLE";
             String CONTENT = "CONTENT";
             String DATE = "DATE";
    
             v.addElement(new ListRander(listThumb, TITTLE, CONTENT,DATE, navBar));
    
             myListView = new CustomListField(v){
    
                 protected boolean navigationClick(int status, int time) {
                     //Dialog.alert(" time in milisec :" + time);
                     return true;
                 }
             };
    

    CustomListField.java

    public class CustomListField extends ListField implements ListFieldCallback {
    
        private Vector _listData;
        private int _MAX_ROW_HEIGHT = 100;
    
        public CustomListField (Vector data) {
    
            _listData = data;
            setSize(_listData.size());
            setSearchable(true);
            setCallback(this);
            setRowHeight(_MAX_ROW_HEIGHT);
    
        }
    
        public int moveFocus (int amount, int status, int time) {
    
            this.invalidate(this.getSelectedIndex());
            return super.moveFocus(amount, status, time);
    
        }
    
        public void onFocus (int direction) {
    
            super.onFocus(direction);
    
        }
    
        protected void onUnFocus () {
    
            this.invalidate(this.getSelectedIndex());
    
        }
    
        public void refresh () {
    
            this.getManager().invalidate();
    
        }
    
        public void drawListRow (ListField listField, Graphics graphics, int index, int y, int w) {
    
            ListRander listRander = (ListRander)_listData.elementAt(index);
            graphics.setGlobalAlpha(255);
            graphics.setFont(Font.getDefault().getFontFamily().getFont(Font.PLAIN, 24));
            final int margin =5;
    
            final Bitmap thumb= listRander.getListThumb();
            final String listHeading = listRander.getListTitle();
            final String listDesc= listRander.getListDesc();
            final String listDesc2= listRander.getListDesc2();
            final Bitmap nevBar = listRander.getNavBar();
    
            //list border
            graphics.setColor(Color.BLACK);
            graphics.drawRect(0, y, w, _MAX_ROW_HEIGHT);
    
            graphics.drawBitmap(margin, y+margin+10, thumb.getWidth(), thumb.getHeight(), thumb, 0, 0);
    
            graphics.drawText(listHeading, 3*margin+thumb.getWidth(), y+margin);
            graphics.setColor(Color.BLACK);
    
            graphics.drawText(listDesc, 3*margin+thumb.getWidth(), y+ margin+30);
            graphics.drawText(listDesc2, 3*margin+thumb.getWidth(), y+ margin+60);
    
        }
    
        public Object get(ListField listField, int index) {
    
            String rowString = (String) _listData.elementAt(index);
            return rowString;
    
        }
    
        public int indexOfList (ListField listField, String prefix, int start) {
    
            for (Enumeration e = _listData.elements(); e.hasMoreElements(); ) {
    
                String rowString = (String) e.nextElement();
                if (rowString.startsWith(prefix)) {
    
                    return _listData.indexOf(rowString);
    
                }
    
            }
    
            return 0;
    
        }
    
        public int getPreferredWidth(ListField listField) {
    
            return 3 * listField.getRowHeight();
    
        }
    
    }
    

    Listrander.Java

    public class ListRander {}

    private bitmap listThumb = null;
    incognito bar Bitmap = null;
    private String listTitle = null;
    private String listDesc = null;
    private String listDesc2 = null;

    public ListRander (Bitmap listThumb, String listTitle, String listDesc, String listDesc2, Bitmap navBar) {}
    this.listDesc = listDesc;
    this.listDesc2 = listDesc2;
    this.listThumb = listThumb;
    this.listTitle = listTitle;
    this.navBar = bar navigation;
    }
    public getListThumb() {Bitmap image
    Return listThumb;
    }
    {} public void setListThumb (listThumb Bitmap)
    this.listThumb = listThumb;
    }
    public getNavBar() {Bitmap image
    return the navigation bar;
    }
    {} public void setNavBar (navigation bar of the Bitmap)
    this.navBar = bar navigation;
    }
    public String getListTitle() {}
    Return listTitle;
    }
    {} public void setListTitle (String listTitle)
    this.listTitle = listTitle;
    }
    public String getListDesc() {}
    Return listDesc;
    }
    {} public void setListDesc (String listDesc)
    this.listDesc = listDesc;
    }
    public String getListDesc2() {}
    Return listDesc2;
    }
    public void setListDesc2 (String listDesc2) {}
    this.listDesc2 = listDesc2;
    }
    }

    You seem to have two problems here and are confusing them.  You must break the problem into two parts

    (1) extract the data from the entry and create the objects you want to display

    2) display in a list, a set of objects.

    Let's get the sorted first premiera.

    I will suggest what to do here, but in practice, you might actually think about this yourself as part of the design phase of your application.  You should do this, not me, because then you will have all the information available.  At the present time, I have just what you said, which is not much.  So maybe what I'm telling you is not correct for your application.  Only you can decide that.  And be blunt here, you should have decided this before you start coding.  Do you want you could lead down the wrong path.  You must think of your application as a home - as the architect must design all the rooms, and how they will be built, before you start building the House.  You do not, then we are building the rooms on the fly.  Who knows if they will be fit at home?

    In this case, I think you need to create an object that represents each of the elements in the internal array of new data.  call this object

    NewsItem

    This object will have attributes, such as its title, content, date, the linked image and so on, each of whom have will get and set methods.  While you treat each inner element fetch you the associated entry and update the object.

    When you have finished the inner loop of processing, you now have a complete

    NewsItem

    Object, so you will add it to a collection, an array of NewsItem objects, call this _newsItems.  You will create it at the beginning - you know how many entries it takes because it is the number of entries in your outdoor table.

    So before you start to deal with JSON, create your table and the 'index' value of 0.

    Once you have created your Newsitem, add this in the table to the position 'index' and increment "index".

    And once you have analyzed all the JSON, you will have a complete picture.  This is part 1 finished!

    And note in your drawListRow, you are given a clue - that is the index in your tables in _newsItems.  So you can easily find which entry to view and display it correctly.  But it is part 2 and is a separate issue.

  • 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

  • The JSON data displaying on Blackberry Simulator or device not but waving poster

    Hello

    I use ripple to develop an application that makes jQuery/Ajax calls to a Web service that returns jSON. The returned data show in Wellington, but not on the emulator or the device. I use the 9800 torch Simulator, php to create the jSON and jQuery.

    Problem has been resolved. I made a mistake (a rookie mistake real) earlier in the code. I left out 'http://www.mydomain.com' when I did the ajax call to my php page. Everything works now. Thanks to all for trying to help with this.

  • How to upgrade the json data in 12.1.0.2

    XmlType support copy editing xml update, as I have found no json update guide in Oracle XML DB Developer Guide (chapter 39 JSON in Oracle Database)

    I have a json data column named info in the table of tjson as below:

    {

    "'name': 'tom ', '.

    ID card': 12,.

    "addr':"an address. "

    'Phone': ['6574573', '2375899']

    }

    Can I use sql to query a key value (property) of the column of json:

    Select t.info.name from tjson t where t.info is not null and t.info is json (strict)

    But how can I insert (perhaps to update or delete) key (property) in tjson.info, as the copy edit the thing of the xmltype

    There is still no equivalent to the language XQuery Update for JSON. The only form of update, we support is to replace the whole document. At least for XML, for small documents, up to 1 MB in size a complete replacement is often less expensive than the cost of the computation of an update...

  • QNetworkReply running into the problem of loading JSON data

    Hello

    I am a beginner with C++ and QT, but so far I'm starting to love the NDK waterfall!

    I'm trying to load a json data file that is extracted via a http request. Everything goes through, but my json data simply would not load in the QVariantList. So after a few hours of poking arround, I noticed finally that the json returned by the http request data is missing two brackets [] (an @ beginning and an end @).

    When I load the json data into a file with the two brakets included, the QVariantList load properly and I can debug through the records...

    Now my question is... how C++ can I add those parentheses []... See the code example below:

    void MyJSONReadClass::httpFinished()
    {
      JsonDataAccess jda;
      QVariantList myDataList;
    
      if (mReply->error() == QNetworkReply::NoError)
      {
        // Load the data using the reply QIODevice.
        qDebug() << mReply;
        myDataList = jda.load(mReply).value();
      }
      else
      {
        // Handle error
      }
    
      if (jda.hasError())
      {
        bb::data::DataAccessError error = jda.error();
        qDebug() << "JSON loading error: " << error.errorType() << ": "
            << error.errorMessage();
        return;
      }
    
      loadData(myDataList);
    
      // The reply is not needed now so we call deleteLater() function since we are in a slot.
      mReply->deleteLater();
    }
    

    Also, I would have thought that the jda.hasError () have captured this question... but guess not!

    I use the wrong approach or wrong classes? The basic example used is the WeatherGuesser project.

    Thanks for your help...

    It is perhaps not related to media. Try to recover data from QNetworkResponse as a QByteArray then load it into JsonDataAccess using loadFromBuffer:

     myDataList = jda.loadFromBuffer(mReply.readAll()).value();
    

    If this is insufficient, you can add media in this way (not tested, please see the documentation for the names of functioning if it won't compile):

    QByteArray a = mReply.readAll();
    a.insert(0, '[');
    a.append(']');
    myDataList = jda.loadFromBuffer(a).value();
    

    Note that if the response data are zero end (most likely it is not, but there is a possibility of it), you will need to check if the last symbol in byte array is '\0' and insert the capture media.

    QByteArray docs:

    http://Qt-project.org/doc/Qt-4.8/QByteArray.html

  • JSON Date Source

    Hello

    I'm almost done to convert my application to use XML to JSON; the last thing I need to reconfigure is my field of research (which is looking the listView data source).

    In XML, I would fix the query:

    query: "/root/continent"
    

    looking for this file:

    XML

    
        
            
            Brazil vs Croatia
            Thursday 12 June 2014
            17:00PM (Local Time)
            Arena de Sao Paulo
            
        
    
    

    So now, I have converted more of JSON and instead use the title of listItem, I use fixtureInfo just as they were both providing the same information.

    JSON

    [
      {
        "type":"item",
        "id":"1",
        "dateNumber":"12/06/2014",
        "fixtureInfo":"Brazil vs Croatia",
        "dateInfo":"Thursday 12 June 2014",
        "timeInfo":"17:00PM (Local Time)",
        "timestamp":"1402603200000",
        "stadiumInfo":"Arena de Sao Paulo"
      }
    ]
    

    Data source:

    DataSource {
                        id: dataSource1
                        property string sQuery: ""
                        onSQueryChanged: {
                            dataModel1.clear()
                            load()
                        }
                        source: "asset:///JSON/Fixtures.json"
                        type: DataSourceType.Json
                        remote: false
    
                        onDataLoaded: {
                            //create a temporary array tohold the data
                            var tempdata = new Array();
                            for (var i = 0; i < data.length; i ++) {
    
                                tempdata[i] = data[i]
    
                                //this is where we handle the search query
                                if (sQuery == "") {
                                    //if no query is made, we load all the data
                                    dataModel1.insert(tempdata[i])
                                } else {
                                    //if the query matches any part of the country TITLE, we insert that into the list
                                    //we use a regExp to compare the search query to the COUNTRY TITLE (case insenstive)
                                    if (data[i].listItem.title.search(new RegExp(sQuery, "i")) != -1) {
                                        dataModel1.insert(tempdata[i])
    
                                        //Otherwise, we do nothingand donot insert the item
                                    }
    
                                }
    
                            }
    
                            // this if statement below does the same as above,but handles the output if there is only one search result
                            if (tempdata[0] == undefined) {
                                tempdata = data
    
                                if (sQuery == "") {
                                    dataModel1.insert(tempdata)
                                } else {
                                    if (data.listItem.title.search(new RegExp(sQuery, "i")) != -1) {
                                        dataModel1.insert(tempdata)
                                    }
                                }
                            }
                        }
                        onError: {
                            console.log(errorMessage)
                        }
                    }
    

    Therefore, what set that the query - for my data source - so that it will pick up the JSON data as before with XML?

    Thanks in advance.

    Like many I know THAT JSON does not use a query. Check out these https://developer.blackberry.com/native/documentation/cascades/device_platform/data_access/working_w... https://developer.BlackBerry.com/native/reference/Cascades/bb__data__jsondataaccess.html

  • How can I recharge my favorites if I can't find the file "date.json" in my backup?

    My hard drive crashed and everything had to be recovered and reinstalled. I have a data folder Firefox but can not find the file "date.json" which is indicated to open the troubleshooting instructions. Y at - it another option?

    Hello

    If you have the latest version of Firefox, the file places.sqlite is what keeps your bookmarks. See the article for recovery of data from an old profile for more information.

  • How to extract the response JSON data

    Hi all

    I get the following response from the server.

    "
    "PAO - ENV ="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ns1 =" urn: soapservice "container ="http://www.w3.org/2001/XMLSchema"xmlns: xsi ="http://www.w3.org/2001/XMLS
    "Chema-instance" xmlnsPAO - ENC = "http://schemas.xmlsoap.org/soap/encoding/" SOAP - ENV:encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/" > ""<>
    tAdvertismentReturn xsi: type = "xsd: String" > {'MSG1': '1', "MSG2": "success", "DA..."}

    Now, I want to create a QVariantList using JsonDataAccess.

    If I manually extract the JSON string after that

    downloadData = jda.loadFromBuffer (data);

    so I'm able to get the data.

    Without extraction like that how can I take the response JSON data?

    Thank you.

    Thanks for your time,

    Here's my problem how to build a soap with the response object.

    I solved this problem with the help of the example of the weather.

    Thank you.

  • The JSON Foursquare data analysis

    Hello world

    I'm trying to parse a JSON data I got foursquare place search webservice.

    What I really need, is only the City and the country of the result value of the research of venues. I'm not trying to bind the data to a lisy

    Any thoughts? Thank you!!

    The code below does not work

    JsonDataAccess jda;
    QVariant jsonQVariant=jda.load(networkReply).value();
    QVariantList venueList = jsonQVariant.toMap()["venues"].toList();
    
    foreach (QVariant v, venueList)
    {
        QVariantMap venueMap = v.toMap();
        showToast(venueNameMap.value("city").toString());
    }
    

    Below is the result of Foursquare sample json I need to analyze.

    {"meta":{"code":200},
    "response":
    {"venues":
    [{"id":"4cd8a50c15d8b60c4e31230e",
      "name":"HSBC Bank",
      "contact":{},
      "location":
              {"lat":4.5850378697477656,
               "lng":92.70275974273682,
               "distance":77,
               "city":"Kuala Lumpur",
               "state":"Selangor",
               "country":"Malaysia",
               "cc":"MY"},
      "canonicalUrl":"https:\/\/foursquare.com\/v\/kompleks-asia-mega-mas\/4cd8a50c15d8b60c4e326a0e",
      "categories":
        [{"id":"4bf58dd8d48988d130941735",
          "name":"Building",
          "pluralName":"Buildings",
          "shortName":"Building",
          "icon":{"prefix":"https:\/\/foursquare.com\/img\/categories_v2\/building\/default_","suffix":".png"},
          "primary":true}],
       "verified":false,
       "restricted":true,
       "stats":{"checkinsCount":2872, "usersCount":858, "tipCount":6},
       "specials":{"count":0,"items":[]},
            "hereNow":{"count":1,"groups":[{"type":"others","name":"Other people here","count":1,"items":[]}]},
       "referralId":"v-1372731815"},
    
    .......
    

    Try something like this:

    QString jsonString = QString("{response: {venues: [{},{}]}}");
    
    bb::data::JsonDataAccess jda;
    QVariant list = jda.loadFromBuffer(jsonString);
    QVariantMap result = list.value();
    QVariantMap response = result.value("response").toMap();
    QVariantList venueList = response.value("venues").toList();
    foreach (QVariant venue, venueList)
    {
        QVariantMap venueMap = v.toMap();
    }
    
  • Maps JSON data with two data in the list

    Hey all,.

    Been working with JSON data and informing the lists for a some time now, but im stuck now on a single set of data.

    The data structure is the following:

    [
         {
              data: {
                   children: [ {
                        {}
                        {}
                        {}
                   } ]
               }
         }
    
         {
              data: {
                   children: [ {
                        {}
                        {}
                        {}
                   } ]
               }
         }
    ]
    

    The data that I take care of normally contains one of these structures and not 2 as in the above data. So what follows could could work:

                                    const QByteArray response(reply->readAll());
            ArrayDataModel *model = new ArrayDataModel();
    
            bb::data::JsonDataAccess jda;
            QVariantMap results = jda.loadFromBuffer(response).toMap();
            QVariantList children = results["data"].toMap()["children"].toList();
    
            model->append(children);
            mListView->setDataModel(model);
    

    However, it is now giving me an empty list. So how can I limit the above code to analyze and insert only the 2nd set of JSON data in the list?

    Please let me know if it needs to be clarified. Any help is appreciated. Thank you!

    Hello

    It contains a list of maps. Have you tried something like the following:

    bb::data::JsonDataAccess jda;
    QVariantList results = jda.loadFromBuffer(response).toList();if (results.size() >= 2){
        QVariantMap secondSet = results.at(1).toMap(); // to get the second map
        QVariantList children = secondSet["data"].toMap()["children"].toList();
        model->append(children);}
    
  • How to analyze the server JSON data?

    I use an API and I get responces in JSON format. I need help in the analysis of the received data to JSON.

    This is the data that I get...

    {"code": 200, "lang": "en - us", 'text': ['Hello']} »

    I need to extract the text value (ie: Hello must be extracted)

    Please help me with tis problem!

    Thank you

    In C++ JsonDataAccess is right for you

    http://developer.BlackBerry.com/native/reference/Cascades/bb__data__jsondataaccess.html

    In QML:

    var json = JSON.parse(response)
    

    Now you can access the property like this

    CODE = json.code

    LANG = json.lang

    Etc...

  • How to post JSON using the Oracle Data Service remains

    I use the regular (not NoSQL or something) oracle database with oracle rest data service. Now I need to post data / put wrote in the body of the request using some json/xml format, how to consume them using the rest data service, searching inside the express application?  important: using pl/sql block

    Also, I am on,

    Data service Oracle rest 3.0

    Oracle Application Express 4.2

    Post edited by: Jacynthe

    OK, I got the answer. At the express request, there is a link called body variable (: body in BLOB). but the BLOB data type. So, we have to convert that in other data, type what we in pl/sql. I've converted data type witch CLOB supports json.

Maybe you are looking for