Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QJsonObject validation?
Forum Updated to NodeBB v4.3 + New Features

QJsonObject validation?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 5 Posters 1.0k Views 2 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by SPlatten
    #1

    I can see in documentation for QJsonObject:
    https://doc.qt.io/qt-5/qjsondocument.html
    That there is an enum called DataValidation, but I don't see an isValid or anything similar. How do I validate a QJsonObject instance?

    Kind Regards,
    Sy

    Christian EhrlicherC 1 Reply Last reply
    0
    • SPlattenS SPlatten

      I can see in documentation for QJsonObject:
      https://doc.qt.io/qt-5/qjsondocument.html
      That there is an enum called DataValidation, but I don't see an isValid or anything similar. How do I validate a QJsonObject instance?

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      And again a question which is faster answered by simply looking at the documentation than writing a post here...

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      SPlattenS 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        And again a question which is faster answered by simply looking at the documentation than writing a post here...

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by
        #3

        @Christian-Ehrlicher , obviously not since I referenced the same documentation in my post and didn't find an answer.

        Kind Regards,
        Sy

        jsulmJ 1 Reply Last reply
        0
        • SPlattenS SPlatten

          @Christian-Ehrlicher , obviously not since I referenced the same documentation in my post and didn't find an answer.

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @SPlatten This enum is not used for any isValid() (which by the way would return a boolean), but for something else (what exactly is stated clearly in the documentation).

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          SPlattenS 1 Reply Last reply
          0
          • jsulmJ jsulm

            @SPlatten This enum is not used for any isValid() (which by the way would return a boolean), but for something else (what exactly is stated clearly in the documentation).

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5

            @jsulm , I wasn't questioning the purpose of what is in the documentation, my original question was is there a way to determine if the content of QJsonObject is valid?

            However never mind, I've since resolved the issue.

            Kind Regards,
            Sy

            Pablo J. RoginaP JonBJ 2 Replies Last reply
            0
            • Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              A QJsonObject has a function isEmpty(). Everything else can not be validated in an QJsonObject (how should it be)

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              0
              • SPlattenS SPlatten

                @jsulm , I wasn't questioning the purpose of what is in the documentation, my original question was is there a way to determine if the content of QJsonObject is valid?

                However never mind, I've since resolved the issue.

                Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #7

                @SPlatten said in QJsonObject validation?:

                I've since resolved the issue

                Two things here, please:

                1. share how you solved the issue (for the benefit of other users of the forum)
                2. don't forget to mark your post as solved!

                Upvote the answer(s) that helped you solve the issue
                Use "Topic Tools" button to mark your post as Solved
                Add screenshots via postimage.org
                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0
                • SPlattenS SPlatten

                  @jsulm , I wasn't questioning the purpose of what is in the documentation, my original question was is there a way to determine if the content of QJsonObject is valid?

                  However never mind, I've since resolved the issue.

                  JonBJ Online
                  JonBJ Online
                  JonB
                  wrote on last edited by
                  #8

                  @SPlatten
                  If it's in a QJsonObject it's valid, else it wouldn't get there (from text).

                  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