Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serialize QVariant() #11

Open
ghost opened this issue Feb 5, 2013 · 2 comments
Open

serialize QVariant() #11

ghost opened this issue Feb 5, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 5, 2013

Hello,

Two big problems about the library:

  • First: serialize a QVariant() return NULL, why? It's not convenient at all to use that in an app afterwards.
  • 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...
@flavio
Copy link
Owner

flavio commented Feb 5, 2013

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.

@ghost
Copy link
Author

ghost commented Feb 5, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant