[Interest] QCborValue and Qt types

Andrew Ialacci andrew at dkai.dk
Mon Dec 3 14:13:49 CET 2018

You are exactly correct. Returning a QCborValue is what I want to do. Was writing on phone in a movie theater. :P

One other question:

For the core parts of our infrastructure we use RapidJSON rather than QTs JSON classes as it’s over twice as performant. 

Do you know off hand how how QTs CBOR implantation would stack up against RapidJSON in terms of pure object serialization performance?

Thank you sincerely for your time 🍍

Sent from my iPad

> On Dec 2, 2018, at 8:33 PM, Thiago Macieira <thiago.macieira at intel.com> wrote:
>> On Sunday, 2 December 2018 10:12:56 PST Andrew Ialacci wrote:
>> Hope it’s ok that I barge in :P
>> Are there any recommended strategies for serializing custom model objects?
>> For example a Person class with name, age, and gender properties. 
>> Or would I just write a 
>> QByteArray toCBOR() const 
>> method on all my model classes and create the CBOR object representation
>> manually like with JSON. 
> I'm not sure you meant to return a binary to be placed inside a CBOR payload 
> or if that is the CBOR serialisation. Either way, I don't think returning 
> QByteArray is a good idea. Instead, return QCborValue, such that the value may 
> be placed inside a larger object or array if the caller so wishes.
> Or if you want to do streaming, just void serialize(QCborStreamWriter &);
> Similar for decoding.
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> _______________________________________________
> Interest mailing list
> Interest at lists.qt-project.org
> https://lists.qt-project.org/listinfo/interest

More information about the Interest mailing list