Reading of the key / value to Json in Blackberry 10

Hi all

My BB 10 App connects to a TCP socket and reads the JSON data as this format
{'Symbol': "SMB1": 88.455479126222713 "AskPrice": 78.556789999999992, "BidPrice": 78.35679, "open": 78.45679, "top"}
{'Symbol': 'SMB2', "AskPrice": 45.672380000000004, "BidPrice": 45.47238, "open": 45.57238, "top":55.566967544349296}...}

Display each data as a separate list of point symbols. IE SMB1 in a list and SMB2 element in another element in the list and so on.

now my Questions are:

1-question: when I try to show above Listview data in JSON Format is Empty.Does 'JsonDataAccess' accept above Json format? but when I add before (with "[" "]"), after adding
(with "]") ") and separated by a","at the very top of the JSON format. I can learn Listview.
That is to say
[{"Symbol": "SMB1", "AskPrice": 78.82, "BidPrice": 78.23,: 78.30 'Open', 'High': 78.80: 78.31 'Low', 'close': 78.18}, {...}, {...}] Is there any alternation with attach them like that?

Question-2: [{"Symbol": "SMB1", "AskPrice": 78.82, "BidPrice": 78.23,: 78.30 'Open', 'High': 78.80: 78.31 'Low', 'close': 78.18}, {...}, {...}]
How to access the key pairs / value of this JSON?

my code is like:

JDA JsonDataAccess;
QVariant jda.loadFromBuffer (jsonData) = qtData;
Here's jsonData, QByteArray and contains the above Json data.

and model for the display of the list, it's like
GroupDataModel * model = new GroupDataModel (QStringList ());
model-> setParent (this);
model-> insertList (()) qtData.value;
model-> setGrouping (ItemGrouping::None);
model-> setDataModel ();
Question - 3:
How to update a specific list item in the ListView so Json is like
[{"Symbol": "SMB-1", "Askprice": 100...},]
[{"Symbol": "SMB-1", "Askprice": 200...}]. Same symbol as 'SMB-1' is repeated, I want to update this particular list item, but not to add it as another element of the list.

Thanks in advance... Hope has a solution here...

Welcome to the forum

to make your code more readable please use 'Insert Code' of the RichText Editor

Tags: BlackBerry Developers

Similar Questions

  • What can I do if I can't read that the key is for Windows because of the part of the key on the sticker has rubbed off and must be re-installed Windows?

    The key to Windows inlegible sticker, want to reinstall windows

    What can I do if I can't read that the key is for Windows because of the part of the key on the sticker has rubbed off and must be re-installed Windows?  The product ID is located under the control panel > system maintenance > system > Windows Activation of a useful?  I don't want to end up with a Clipboard after that reinstalling Windows because I have a legitimate copy of Windows, but the key became disfigured over time, since it's on the bottom of the laptop.  I have Windows Vista Home Premium SP 2 running on a Dell Inspiron it's way outside the guarantee of its window.

    Thank you!

    Hello

    If you have a product key on a sticker in your computer, this means that you have an OEM product key. If you have OEM keys, this means that the windows you have here is preinstalled.

    If you reinstall windows OEM copy, you must use either the original manufacturer recovery disk or the recovery partition. If you use one of the people, should not be put to any start-up because the windows OEM versions are technically preactivated.

    If you don't have a disc or a recovery partition, you can contact your OEM (DELL) so that they can send you a disk. Alternatively, you can contact Microsoft Support just in case. : D

  • Question of value Popup Lov key (description of the poster, returns the key value) by default

    Hello

    I have a Popup Lov key (description of the poster, returns the key value) and I want a default value. It is based on a list (user name, id).
    I tried to put the id of the user logged on as default, but what I see on the screen in the field is the value of the id, not the username.
    How can I pass the user id and see the user name?

    Thank you.

    Oh! My bad, I thought you are talking about regualt lOVs not popups.

    OK, so that's what you need to do, I tried it and it worked for me:

    your popup LOV > default > type: body of the PLSQL function > and enter a query like:

    declare
    UID number.
    Start
    Select user_id from the uid of the user
    where UPPER (username) = UPPER(:APP_USER);

    This should show username and retune userid.

    Hope this helps,

    Sam
    Please give good answers by marking correct or useful.

  • Register to offset or feedback or other... need to read in the new value by loop

    I'm having trouble with my values "Relative position". At the beginning of my program, the system resets to the (0,0) position based on the relative position of the values read from the controller. This does not work properly. The program then moves the in the while loop that runs as long as the connection to the controller is maintained. This while loop has a structure of event in there with various buttons as triggers. There is need to read the relative position compared to the desired position and send the difference to the controller and run the movement. The entrance is used as position and execution orders. However, for some reason, read in relative position does not change never 0. This isn't a problem with the controller. If I send a request to the controller in a separate program, it returns the correct values for the relative positions. I have no idea why this is happening. I examined the shift registers and feedback and tried both, but I do not wire them properly or do not work.
    Any suggestions?

    I have it! For those who are curious this issue had nothing to do with LabVIEW. It is the request that I entered. If you notice in the excerpt that I send "= the Rwandan Patriotic Army" or "OPR =". This isn't scoring application appropriate for the Galil controller. The correct notation is "APR" and "BRP" (remove the '=' sign). Now, the program runs properly

    Thank you all!

  • Returns the key value in the product Page

    Hello

    I'm trying to return a key value in a page element after inserting a database record. I've seen several examples of how to do it on the forum. When I try, I get an error, PLS-00049: bad bind variable 'P116_PERSON_ID '. I call a procedure in a package. The page element is defined as source used: only when the current value in session state is zero. The source type is defined as: static Assignment(value equals source attribute). My procedure looks like:

    Start
    insert into persons (list of fields) values (value list) POLLING person_id IN: P116_PERSON_ID;
    end;

    The procedure works fine if I use something said instead of the page element: P116_PERSON_ID.

    I also tried v ('P116_PERSON_ID') and & P116_PERSON_ID, which did not work.

    What I am doing wrong? I need to convert my procedure to a function and the return key?

    Thanks, Elizabeth

    Elizabeth:

    You can try this

    declare
    l_person_id number;
    begin
    insert into people(list of fields) values(list of values) RETURNING person_id INTO L_PERSON_ID;
    apex_util.set_session_state ('P116_PERSON_ID', L_PERSON_ID);
    end;
    

    CITY

  • Reading only the numerical value of data packet?

    I have an entry that gives me: 122345, %, 0000 0000

    I want just the 122345 part so that I can graph the value in real time as data are to be listened to in the computer. How can I choose for this? Now I just have a straight read command and read buffer indicator, I did just unroll the package according to the number of bytes I tell her to read.

    Watch the channel for several functions in the palette of the format string.  If the values are always integers, and always at the beginning of the string, the decimal string to number feature will work without extra effort.

    Lynn

  • How can I navigate another feature of a local html and remote html url and transmit data or the key, value pair?

    Hello

    I'm trying to integrate a local html file and a remote url base html file MAF 2.0.1 based app. I want to access another device (based amx) on click of a button on the html pages. How can I achieve the same?

    Already tried with the below which fails with call javascript directly on the page html itself.

    -HTML-

    <! DOCTYPE html >

    < html >

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = windows-1252 "/ >"

    Home < title > < /title >

    < script type = "text/javascript" >

    document.addEventListener ("deviceready", callfeature, false);

    function callfeature() {}

    Alert ("callfeature called to map");

    adf.mf.api.gotoFeature ("sni.gps.demo.locationFeature", function (req, res) {})

    Alert ("full gotoFeature");

    },

    function (req, res) {}

    Alert ("gotoFeature failed with" + adf.mf.util.stringify (res));

    });

    Alert ("callfeature called to map closed");

    }

    < /script >

    < / head >

    < body >

    Simple mobile Web Page < h1 > < / h1 > < form method = "get" >

    < input id = "ip1" name = "name" / >

    <!-a href = "mycustomurlscheme://somedata" id = "myurl" > map < / a->

    < button type = "button" id = 'mybtn' name = "gpsbtn" onclick = "callfeature ()" >

    go to the feature

    < / button >

    < / make >

    < / body >

    < / html >

    Hello

    update to 2.1 MAF gives you , that can be added to HTML files the and remote access to the MAF since JavaScript API. Deepak mentioned "adf.mf.api.gotoFeature" and I can confirm it works HTML distance (and so it should be using local HTML). For the transmission of data, not sure whether the request URL object it. I would try here EL referencing a managed bean of application-scope defined in the scope of application (?). I tried beans controlled but so far has not tried to access the managed beans to a feature local or remote HTML using EL (although the EL is here)

    Frank

  • To access the inside loops key/value pairs

    According to the docs of Shopify, liquid allows access to key/value pairs in for loops, as follows:

    {% for item in hash %}   {{point [0]}}: {{point [1]}} {% endfor %}

    This does not work in the liquid renderer in British Colombia; the output of the key/value tags are empty. Here is an example of using the always available this.urlculture global object:

    {   ...   {"urlculture": {"ModuleName": "urlculture", "culture": "EN"},...}

    {% for obj in this.urlculture %}

    {{ obj | json }}
    Key: {{obj [0]}}
    Value: {{obj [1]}}
    {% endfor %}

    This is the result I get:

    {
      "Key": "moduleName",
      "Value": "urlculture"
    }
    
    Key:
    Value:
    
    {
      "Key": "culture",
      "Value": "EN"
    }
    
    Key:
    Value: 

    Access by name (such as {{ obj.Key }} ) also fails.

    Am I missing something, or is this all just not yet implemented?

    Also, why isn't the nice formatting illustrated in this visible post editor in the current post code?

    Thank you, Robert.

    This was a great find. And you'll be happy to learn that we have set and it will work in the next version (unfortunately the hotfix does not update today, we have deployed on the beta version).

    You will then be able to do things like:

    {% for getParam in globals.get %}
    {{getParam[0]}} = '{{getParam[1]}}'
    {% endfor %}

    -Lucian

  • What is the best way to move with esx3.5 vmtools key/value pairs?

    Hello

    I found both candidates to store the key/value pairs for a vmware client. My ultimate goal is to run a process on the VC box that updates these data, and then read through the software tools of vm on the host (somehow) were invited.

    The first method is through 'guestinfo' settings which can be adjusted in four ways:

    Add the variable of the vmx fileprompt.
    Set the variable manually on the client (using vmwareservice.exe - cmd "infoset");
    using vmware-cmd (vmware-cmd & lt; vm-cfg-path & gt; setguestinfo & lt; variable & gt; & lt; value & gt;)
    the use of vmcom.dll COM objects (seems to be deprecated in ESX 3.5)
    These variables are easily accessible on the client by running vmwareservice.exe - cmd 'info-get guestinfo.variablename '. However, I cannot find a convenient way (better based on powershell) of their definition of a scheduled task or service to VC area.

    The second method is the customfields of guests in VItoolkit property, which can be defined as follows:

    get - vm MyVMName | Game-CustomField-nameOfValue name-value DataToBeStored
    Unfortunately, I am unable to access these data in the comments, and indeed I do not know if this is possible. If this isn't the case, I guess my only recourse would be to write a tool to connect to Web services on the VC box with a low privilege account. I prefer not to do this because it means the network infrastructure implementation to point the guest to the right VC, development of custom etc permissions...

    So, my questions are:

    • Is it possible to define variables of guestinfo through VI Toolbox, running on the virtual circuit?

    • Is it possible to read customfields on the client, through the vmtools?

    • Or is there another method to make this key/value data exchange?

    You can add/edit entries in the VMX file like this

    $vm = get-vm  | Get-View
    
    $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
    $vmConfigSpec.extraconfig[0].Key= "guestinfo"
    $vmConfigSpec.extraconfig[0].Value = "whatever"
    
    $vm.ReconfigVM($vmConfigSpec)
    
  • all the keys of reading

    using the tool to test, I believe that I can read only some keys via:

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyDown);

    But when I test in a browser, I can indeed read all the keys. Thus, the IDE must be intercept some pressures on the keys. For example, I can read w and d but not e.

    How can I read all the keys? It's a little awkward to test in a browser all the time. Thank you.

    In addition, why is it so?

    When testing of the tool, in the player, you must assign to disable keyboard shortcuts.  Control-> disable keyboard shortcuts.

  • Problem LOV... Turning the display value and no key-value

    Hello. Sorry for my bad English.

    I have a problem with LOV dynamic pop up.

    I have a simple form called nom_element and item_code containing the form A. users can create, update, and delete a new item using this form.
    Another form called form B has a field called item_code item_code is a dynamic field of LOV pop up and a request for this LOV is like that;

    Select nom_element d, r from item_master by item_code item_code;

    When I create the new record in the form B and LOV allows to find and get the item code, LOV works very well
    and he returns the key value in the field of item_code.
    But when I try to update the record (I have a link to the page of the form B), item_code field value is not the key-value of LOV, but is a
    Display value of LOV.

    Any ideas?

    Thank you.

    Hello:

    If you want to display the key value, and then create a new field that can be a test field or a tabled text (display only) and assign the value of the column of the reporrt link or just the column as it appeas in the database.

    If you use the form at the same time create and view, you might want to do this new field, but also your LOV field as conditional.

    Bruce

  • Several key pointing to the same value in the cache?

    I would like to do something like
    MyObject o = new MyObject();
    cache.put("A", o);
    cache.put("B", o);
    cache.put("C", o);
    
    cache.invoke("A", new RelfectionUpdater("setSomeValue", 1));
    cache.invoke("B", new RelfectionUpdater("setSomeValue", 2));
    cache.invoke("C", new RelfectionUpdater("setSomeValue", 3));
    
    int x = cache.invoke("A", new ExtractorProcessor("getSomeValue")); 
    //x=3
    I want this type of behavior, even if I change to another caching strategy. Should I wait?

    Thank you
    Andrew

    Hi Andrew

    To answer this question, I think we need to take a step back and understand what is happening when we first put ().
    During the option put, the object is serialized into a binary format associated with a key. The key/value then moves to an arbitrary location for storage. A way of thinking that it is that the value is copied from your Java to another memory space space memory local or remote.

    Puts subsequent will be associated and copy 'o' to potentially different memory spaces. That the 'o' associated A is not equal to B 'o'.

    There are ways to achieve what you want to do, but because of the indirection, it will be very slow. The model is to store the value in a put and use the key as a value in A, B and C.

    Thank you
    / Charlie

  • How to programmatically Exchange data (key-value pairs) with operating system called?

    Hi all

    Is there a programmatic way to Exchange data (of the key-value pairs) with the guest OS?

    We have an application that runs inside comments, and we want that this application in order to use this mechanism to Exchange data. At this point, the guest have no network connectivity. One thing that might work for us is to use the registry to the guest operating system. But I'm not sure how to handle the registry of the guest operating system.

    We looked in the VirtualMachineConfigInfo.extraConfig property, but these key-value pairs are not accessible from the comments (at least this is what I know)

    any ideas?

    Thank you

    Onur

    I think that it is better to use an environment variable or file to Exchange data with the guest operating system.

    http://www.doublecloud.org/2012/03/set-environment-variables-in-guest-operating-system-on-VMware/

    http://www.doublecloud.org/2012/03/read-environment-variables-in-guest-operating-system-on-VMware/

    If you really want the registry value,

    http://www.doublecloud.org/2012/02/run-program-in-guest-operating-system-on-VMware/

    http://en.Wikipedia.org/wiki/Windows_Registry#Command_line_editing

    Good luck!

    Steve, author of the Open Source, VMware VI and vSphere SDK VI Java API

  • Read the value of XML or JSON based on the name of the key

    I can't figure out how to get the value of the url to Image_Calendar1 JSON or XML data.  Sorry if it's 'obvious', but I am a new developer.

    I was cheating and ListItemData.value [1] .url but in this case, that the XML feed changes the number values of the moments which throws out of my method.  I need to be able to get the value based on the name of the key.  Is this possible?

    Thank you. Examples of the XML and the JSON /port.

    Okay, it might not be pretty, but what I do to solve my problem is to convert the ListItemData in JSON and stringify it.  I then split the string with 'key' and then count the lines.  Would not work if 'key' wasn't in each line, or if there are child elements of the child elements.  But... it works for me at the moment.  Future, me I hope, will be more intelligent and can fix it when it breaks.

    var testString = String (JSON.stringify (ListItemData))

    var javascriptcount = String (testString.split("key").length - 1).

    Console.log ("try to use the length:" + javascriptcount)

  • 10g: how to read a key/value registry, the mac address

    Dear,

    I have developed an application using Forms 10 g. I need in a certain place to read a registry key for windows server 2003 on which the application server is installed.

    I know how to read the registry on the Client computer using webutil. But is there any other utility to read registry of the application server?
    Or I have to use D2KWUTIL in my form?

    Also, I need to read different physical address on the application server.

    Help, please

    Thank you very much.

    I do not remember where, but you can download it from there.

    François

Maybe you are looking for

  • L830 satellite - Bluetooth cannot connect after installing Win 7

    I reinstall (Windows 7 Home Premium) on my laptop PSK84V-02400UAR Toshiba Satellite L830, and install all the drivers, but after you install all the drivers, I can't connect any Bluetooth device to this tour... When I search using the Bluetooth windo

  • Degraded data please help im know if everything lost

    Hi, I recently bought a "new" rn21400 4 unit without drive Bay and two new disks 4 TB Western Digital RED. everything has been works well since I've set up three days ago, today I though I would transfer the last of my documents to the nas to my pc (

  • What does "DSD" close the SD card slot for?

  • While a single 2610 stop working

    my all in one single 2610 simply stopped communicating with my office; has got the following messages: has not passed window logo testing to verify capatibility with windows xp, then hpgwiamd.dll of files on cd necessary, then hpzius12.sys on hp need

  • Repair of the lens!

    I have a 5 month old Canon 60 d and a 70-300 mm. Two weeks while clicking on a bird, I fell on the ground. The camera did not touch the ground, as it was in my hand, but a part of the lens hit the no-so-hard ground. Some dust/dirt probably went insid