[Development] unified data model API in QtCore => thin wrapper proposal

Tor Arne Vestbø Tor.arne.Vestbo at qt.io
Fri Aug 17 17:13:21 CEST 2018



> On 17 Aug 2018, at 17:08, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> On Friday, 17 August 2018 02:50:32 PDT Tor Arne Vestbø wrote:
>>> Unless someone can volunteer to test. I *think* my design is slightly
>>> better than QJsonValue, so the following should work:
>>> 
>>> value[1]["hello"][32] = false;
>> 
>> That’s great news. I assume it’s also easy to convert from and to JSON, so
>> that one could use QCbor as an intermediate data format if one needs to
>> modify JSON In place and write it out again?
> 
> Please note I said that I *think* it should work, not that it does work. Could 
> you give it a try and see if it makes your life easier?
> 
> Now, looking at the code, I don't think it does work. I thought that 
> QCborValue::operator[] returned QCborValueRefs, but it doesn't. Adding a set 
> of non-const overloads returning QCborValueRef might be the trick.

That would be great to have as part of the API yes

> And it's a trick we can add to QJsonValue too.

That would be great, but I think it was kind of tricky with the current design of QJsonValue.

Tor Arne 



More information about the Development mailing list