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. Qt5 QJsonDocument vs QJson (sf)
Forum Updated to NodeBB v4.3 + New Features

Qt5 QJsonDocument vs QJson (sf)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.5k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    nvcnvn
    wrote on last edited by
    #1

    In the past I have try (just a little) with http://qjson.sourceforge.net/usage/, I love the QJson's QObject helper that can dump and restore QObject’s attributes.

    Now In Qt5 I see the http://qt-project.org/doc/qt-5.0/qtcore/json.html but I cannot find any example!
    With the new JSON support in Qt5, can and map my "custom class" to JSON and reserve...easily like QJson?

    Can you send me some example with the new Qt5 Json, thanks!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tigroo
      wrote on last edited by
      #2

      qobjecthelper.h and .cpp only use core classes:
      @#include "qobjecthelper.h"

      #include <QtCore/QMetaObject>
      #include <QtCore/QMetaProperty>
      #include <QtCore/QObject>
      #include <QtCore/QString>@

      So you can do the same thing on Qt 5. Be careful , the original code is under GPL. (not LGPL-like), you can't copy/paste it and do everything with:
      @* Copyright (C) 2009 Till Adam adam@kde.org

      • Copyright (C) 2009 Flavio Castelli flavio@castelli.name@
      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