The first problem was, that you used "toByteArray()" from a QVariant to
convert unknown QVariant types. But this method is only working for
strings and byte arrays. So in your code, it always returned an empty
byte array.
The second problem was, that a null or empty variant should get
converted into a "null" value, which is supported by the JSON specs.
Otherwise it isn't possible to put...
2009-08-05 22:42:11 UTC in QJson