What's the best way to read JSON data?

Hi all;
What is the best way to read in JSON data? And is the best way to use it once read in to turn it into XML and apply XPath?
thanks - dave

jtahlborn wrote:
without having a better understanding of what your definition of "use it" is, this question is essentially unanswerable. Jackson is a fairly popular library for translating json to/from java objects. the json website provides a very basic library for parsing to/from xml. which one is the "best" depends on what you want to do with it.Good point. We have a reporting product ([www.windward.net|http://www.windward.net]) and we've had a number of people ask us for JSON support. But how complex the data is and what they want to pull is all over the place. The one thing that's commin is they generally want to pull down the JSON data, and then put specific items from that in the report.
XML/XPath struck me as a good way to do this for a couple of reasons. First it seems to map well to the JSON data layout. Second it provides a known query language. Third, we have a really good XPath wizard and we could then use it for JSON also.
??? - thanks - dave

Similar Messages

  • What's the best way to read/write data from a file (preferabl​y a *.txt file)?

    As in the title.  l have revived a couple of old VIs to read and write three numbers and a 1D array of clusters to/from a *.txt file.  The functionality is not very user friendly, and it would also be useful if one could open the text files (manually - not through LabVIEW) and still be able to see/understand what was there.
    I was wondering if anyone would be able to come up with a more efficient and/or user friendly method (compatible with lv6.1) 
    James
    Never say "Oops." Always say "Ah, interesting!"
    Attachments:
    Read Spec.vi ‏110 KB
    Write Spec.vi ‏58 KB

    My primary goal is to have something that works and is easy and comprehensive to operate.  Generating a human-readable file is just a bonus but would be nice if it could be achieved.
    I enclose pictures of the initial file dialog (for both loading and saving the data - referred to as Spec(s) from hence forth), and of the front panel screen seen when  a) loading a spec and  b) saving a spec.  In the file dialog, you have to already know the exact string to input else you'll just be told the file doesn't exist (applies for both loading and saving).  When saving a spec, you cannot see any files previously saved, nor even any previous specs saved within the file.  This means that one can unwittingly overwrite specs without realising it.
    I'm not sure if I've explained this very well, but the current functionality means that far too much can go wrong.  Additionally, if you forget the file name, you'll have no way of knowing what it should be (the data files are stored on a 'locked' part of our network accessible only by Admin or through the LabVIEW executable
    Never say "Oops." Always say "Ah, interesting!"
    Attachments:
    File Dialog.JPG ‏23 KB
    Select The Required Test Spec.JPG ‏10 KB
    Name of specification.JPG ‏6 KB

  • What is the best way to read and manipulate large data in excel files and show them in Sharepoint

    Hi ,
    I have a large excel file that has 700,000 records in it. The excel file has a few columns that change every day.
    What is the best way to read the data form the excel file in fastest and most efficient way.
    2 nd Problem,
    I have one excel file that has many rows each row contain some data that has certain keywords.
    What I want is  to segregate the data of rows into respective sheets(tabs ) in the workbook.
    for example in rows have following data 
    1. Alfa
    2beta
    3 gama
    4beta
    5gama
    6gama
    7alfa
    in excel
    I want there to be 3 tabs now with each of the key words alfa beta and gamma.

    Hi,
    I don't really see any better options for SharePoint. SharePoint use other production called 'Office Web App' to allow users to view/edit Microsoft Office documents (word, excel etc.). But the web version of excel doesn't support that much records as well
    as there's size limitations (probably the default max size is 10MB).
    Regarding second problem, I think you need some custom solutions (like a SharePoint timer job/webpart ) to read and present data.
    However, if you can reduce the excel file records to something near 16k (which is supported rows in web version of excel) then you can use SharePoint Excel service to refresh data automatically in the excel file in SharePoint from some external sources.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • What's the best way for reading this binary file?

    I've written a program that acquires data from a DAQmx card and writes it on a binary file (attached file and picture). The data that I'm acquiring comes from 8 channels, at 2.5MS/s for, at least, 5 seconds. What's the best way of reading this binary file, knowing that:
    -I'll need it also on graphics (only after acquiring)
    -I also need to see these values and use them later in Matlab.
    I've tried the "Array to Spreadsheet String", but LabView goes out of memory (even if I don't use all of the 8 channels, but only 1).
    LabView 8.6
    Solved!
    Go to Solution.
    Attachments:
    AcquireWrite02.vi ‏15 KB
    myvi.jpg ‏55 KB

    But my real problem, at least now, is how can I divide the information to get not only one graphic but eight?
    I can read the file, but I get this (with only two channels):
    So what I tried was, using a for loop, saving 250 elements in different arrays and then writing it to the .txt file. But it doesn't come right... I used 250 because that's what I got from the graphic: at each 250 points it plots the other channel.
    Am I missing something here? How should I treat the information coming from the binary file, if not the way I'm doing?
    (attached are the .vi files I'm using to save in the .txt format)
    (EDITED. I just saw that I was dividing my graph's data in 4 just before plotting it... so It isn't 250 but 1000 elements for each channel... Still, the problem has not been solved)
    Message Edited by Danigno on 11-17-2008 08:47 AM
    Attachments:
    mygraph.jpg ‏280 KB
    Read Binary File and Save as txt - 2 channels - with SetFilePosition.vi ‏14 KB
    Read Binary File and Save as txt - with SetFilePosition_b_save2files_with_array.vi ‏14 KB

  • This community is great -- very helpful. What is the best way to read "word" docs on my brand new iPad 2? Is there an app for that?

    This community is great -- very helpful. What is the best way to read "word" docs on my brand new iPad 2? Is there an app for that?

    If you're just reading them from email attachments, you can just open it to "view" the document.
    However, if you wish to do editing and work, you'll need an application. I use Documents to Go, but there are other versions that people are happy with - do a search in the App store for "office suite" or "word processing".
    The next challenge is getting docs back and forth. Doc2Go and others have their own ways to physically sync docs when connected to a computer; you can also email changed/revised/new documents from the iPad to yourself. However, I use a "cloud service" called DropBox that stores docs in the cloud (so I can get to them anywhere) - I paid for the Premium version of Docs2Go to allow that kind of syncing.

  • I am giving away a computer, what is the best way to wipe out data prior to depature

    i am giving away a computer, what is the best way to wipe out data prior to depature

    Did the Mac come with two grey disks when new? If so, use disk one to erase the drive using Disk Utility and then re-install the OS from the same disk. Once installed, quit and when the new owner boots they can set it up as a new out-of-the-box Mac when they boot it up. The grey disks need to be passed on with the computer.
    If you need detailed instructions on how to erase and re-install please post back.
    If the Mac came with Lion or Mountain Lion installed the above process can be done using the Recovery HD as since Lion no restore disks are supplied with the Mac.
    The terms of the licence state that a Mac should be sold/passed on with the OS installed that was on the machine when new (or words to that effect).

  • What is the best way to captue current date and time?

    I got a field in table to capute current date and time...i am
    using SQL Server.
    field name datatype length
    enter_datetime datetime 8
    What is the best way to get current date and time and insert
    to table?.
    Is this way?.
    <cfset curtime = 'dateformat(#now()#,'mm/dd/yyyy')&"
    "&timeformat(#now()#,'hh:mm:ss')'>
    This way looks like time is not entered correctly.
    or any other better way?.

    > get current date and time and insert to table?
    You can use cfqueryparam
    <cfqueryparam value="#now()#"
    cfsqltype="cf_sql_timestamp">
    Or as was suggested, set the default for your table column to
    getdate(). Then you won't have to insert anything. Sql server will
    do it automatically when a new record is created.

  • What is the best way to insert massive data into an existing excel file?

    dear gurus,
    i am wondering that what is the best way to insert massive data into an existing excel file, more performance perspective.
    the file is read from BDS , and we want to insert data into it .
    the way i can think of is
    1. OLE AUTOMATION
       i think performance will be a big problem
    2. Office integration
        i am not sure it's facing the same performance issue ?
    3 . XXL_SIMPLE_API/FULL_API
        I am not sure whether they can insert data into an existing excel file?
    could you please give me some advices?
    br.
    jun

    Hi,
    If you want to APPEND data( add data to an existing excel file) from SAP, then use GUI_DOWNLOAD fm with APPEND = 'X' paramter.
    Best regards,
    Prashant

  • What is the best way to transfer my date from my old iMac to my new iMac?

    what is the best way to transfer my date from my old iMac to my new iMac? I don't have a time capsule, so I cannot use time machine.
    thanks

    Your best bet by far is to use Setup Assistant when the new Mac first starts up to transfer directly from the old one. 
    It's similar to Migration Assistant, but doing it that way will avoid having an extra user account.
    Either way, you can connect them via FireWire, Thunderbolt, or your network, but avoid wireless if at all possible.  You can connect both to your netwrork via Ethernet, or put a single cable between the two. 
    See Using Setup Assistant on Mountain Lion or Lion for details.

  • What is the best way to edit meta data..

    What is the best way to edit meta data and tag photos, faces, places etc. and have the data saved to the original photo.
    On a PC I would just use Windows Gallery. iPhoto on the Mac allows for some tagging, but it doesn't save to the original file.
    I like to have my photos in a folder, edit them and save the changes.
    What software would work best on a MAC to accomplish this?
    Thanks for any help,
    Nick

    iPhoto is a database and any metadata you add or edit is available in any app - if you learn how to use it.
    iPhoto is a non-destructive processor. It never touches the original file - it treats it like a film shooter treats the negative.
    If you want a copy of the original file with the metadata included simply export a copy.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    As an FYI:
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • What is the 'quickest' way to read char data from a txt file

    Hello,
    What is the 'quickest' way to read character data from a txt file stored on the phone to be displayed into the screen?
    Regards

    To be even a bit more constructive...
    Since J2me does not have a BufferedInputStream, it will help to implement it yourself. It's much faster since you read large blocks at ones in stread of seperate chars.
    something line this lets you read lines very fast:
      while ( bytesread < filesize ) {
             length = configfile.read( buff, 0, buff.length );
             // append buffer to temp String
             if ( length < buff.length ) {
                byte[]  buf  = new byte[length];
                System.arraycopy( buff, 0, buf, 0, length );
                tmp.append( new String( buf ) );
             } else {
                tmp.append( new String( buff ) );
             // look in tmp string for \r\n
             idx1 = tmp.toString().indexOf( "\r\n" );
             while ( idx1 >= 0 ) {
                //if found, split into line and rest of tmp
                line = tmp.toString().substring( 0, idx1 );
             /// ... do with it whatever you want ... ////
                tmp = new StringBuffer( tmp.toString().substring( idx1 + 2 ) );
                idx1 = tmp.toString().indexOf( "\r\n" );
             bytesread += length;
          }

  • What is the best way of reading a browser cookie and writing to sessionbean

    Hi,
    So far I have happily written a cookie in the visting browser and happily can display with a browser using a servlet println etc
    But what is the best way to take that value and put it into say getSessionBean1().setCookieValue("Cookievalue");
    I was thinking on the lines of calling a forward from the servlet "nexpage?cookievalue=stringetc".... or is there some nicer way?
    Thanks
    James

    In the page I simply referenced the facescontext directly... no need for a custom servlet.
    public void createcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletResponse resp = (HttpServletResponse)fc.getExternalContext().getResponse();
    Cookie userCookie = new Cookie("cookiename", "cookievalue");
    userCookie.setMaxAge(-1);
    userCookie.setMaxAge(3600);
    resp.addCookie(userCookie);
    return null;
    public String readcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    ExternalContext ec = fc.getExternalContext();
    Map cookiemap = ec.getRequestCookieMap();
    if (cookiemap != null) {
    Cookie cookie = (Cookie) cookiemap.get("cookievalue");
    return cookievalue;
    For reference I could not get getCookies() method of HttpServletRequest to work.. it would only return JSESSIONID.

  • What is the best way to move all data and apps from an old ipad to a newq ipad air?

    What is the best way to convert (update) from an original ipad to a new ipad air?

    How to Transfer Everything from an Old iPad to New iPad
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
    Moving Content to a New iPad
    http://tinyurl.com/qzk2a26
    Transferring your prepaid cellular data account depends on your carrier. AT&T lets you move it yourself when you go to Cellular Data in Settings and log into your account with your previous AT&T user name and password. For iPads with Sprint service, you can set up an account on the new iPad and contact Sprint Customer Care (888-211-4727 and go through the menus) to deactivate the old plan and get credit for unused service. For Verizon, call the company’s customer service number for mobile broadband support (800-786-8419) and ask to have your account transferred.
     Cheers, Tom

  • What is the best way to get/change data in R/3 from external interface?

    Hi SAP gurus,
    I have a problem to know what is the best technology to access and maintenance all SAP functionality and data too in R/3 systems.
    Anyone know if connectors (.NET or JCO) are the only solution to manipulate all SAP system data or exist other way?
    One thing more, what is the best connector, with more functionality?
    E.g. The screen painter was made in C++ and is executed by user event in R/3 system, so would like to know if it's exist any way to do the same but replace the screen painter to another custom application?
    Regards

    Hello Vitor
    Not all functions and data are externally accessible. Only those business objects (e.g. like sales order, customer, material) for which BAPIs are available (transaction BAPI ) can be accessed via RFC.
    Regards,
        Uwe

  • What's the best way of reading PDF books in iPhone? Please, name software.

    Hey all,
    I have a PC but a friend of mine has MAC, and we're both looking for best way to view pdf documents, but not through e-mail savings. Can you please help us, by naming any good APP or anything like that.
    Thanks for the answer,
    Mari!

    If the app store is not available then no one can recommend an app to read PDFs except as email attachments.

Maybe you are looking for

  • MRS  Auto Scheduling  Network Order

    Has any one in the forum implemented or know how to achieve Automatic Scheduling of Demand  (Network Order/ Network Activity ) created through PS (Project Systems) in the MRS tool. ?  Using Service Orders, this is a configurable item, with a BAdI for

  • IPhone has been syncing for 2 hrs, now iTunes doesn't recognize my phone and is "restoring iPhone from backup"

    It's been a while since I've synced with my computer (yes, I'm still on iOS 4.0). Tonight I finally synced all my music, apps, purchases, etc. Tried to import all photos into iPhoto (tried 3 times) and about a third of the way through my 3,000 files

  • Documents/Commentary

    Hi everyone, We would like to implement a solution which provides them with the functionality to add Commentary and Annotations to BW Reports when they enter data manually via BPS and to have these documents displayed inline with the web report. SEM/

  • Keyboard short-cut for Restart and Shutdown?

    Since recent keyboards and Mac OS X doesnt have keyboard short-cuts for Shutdown and Restart, is it possible to create new ones for these functions? Also, why doesnt Mac OS X have these anymore (such as when it had the keyboard with that button you h

  • Best Safari for Mac OS 10.4. ......

    - Some naivete involved here. More incidentally, contextually, .. I'd lost general access to my Finder, .. and so, with this, and with having had a re-installation done, of my main OS. - at the time, 10.3.9, and now, 10.4, ... .. at this point, I'm t