GithubHelp home page GithubHelp logo

serialize QVariant() about qjson HOT 2 OPEN

flavio avatar flavio commented on July 24, 2024
serialize QVariant()

from qjson.

Comments (2)

flavio avatar flavio commented on July 24, 2024

First: serialize a QVariant() return NULL, why? It's not convenient at all to use that in an app afterwards.

I guess you are talking about an invalid QVariant (like the one returned by QVariant()). Probably it would be better to mark the serialization process as failed. What do you think about it?

Second: I quote from the doc "If the returned string is empty, the document was empty." I don't get that at all ! An empty string is not json...

Are you talking about parsing a json object into a QVariant? I don't think that's a big deal, but if you want I could mark the parsing process as failed.

from qjson.

 avatar commented on July 24, 2024

Yep, thank you for the answers 👍

Concerning the second question, it's just written in the documentation for the serialization. And it doesn't make sense to me, because the empty string isn't json.
So I need to do a test of an empty string over your library, which is a bit redundant of the purpose of the lib.

from qjson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.