Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. JSON parsing with QtJson...
Forum Update on Monday, May 27th 2025

JSON parsing with QtJson...

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 7 Posters 3.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F filipdns

    @aha_1980 Hello, I start to read yes, I'm trying to understand how do that in js, I found documentation on QJsonArray only for c++ at the moment

    kshegunovK Offline
    kshegunovK Offline
    kshegunov
    Moderators
    wrote on last edited by kshegunov
    #21

    In JS you just parse it, as it's a natively supported.

    var myJson = JSON.eval(jsonText);
    

    If it's a valid json, then properties are available directly as any other java script object, or in your case:

    var obj =JSON.parse(res);
    console.log("Latitude: " + obj.aircraft[0].geography.latitude);
    

    I still don't get the relevance, though.

    Read and abide by the Qt Code of Conduct

    1 Reply Last reply
    2
    • M Offline
      M Offline
      makcorps
      Banned
      wrote on last edited by
      #22
      This post is deleted!
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved