Qt-less WAM: QJson analysis of replacements

Description

Analysis of possible replacements of QJson:

  • pbnjson

  • json-c

  • jsoncpp

 

Environment

None

Activity

Walt Miner 
February 11, 2019 at 11:11 PM

Close for FF 6.0.4 and GG 7.0.0

Nick Yamane 
November 8, 2018 at 12:29 PM

After a further analysis we decided to go with Jsoncpp due to:

  • Simple object-oriented C++ APIs

  • Similar in several aspects to Qt APIs

  • Widely deployed, on of the most popular C++ Json libs [1]

[1] https://en.wikibooks.org/wiki/JsonCpp#Foreword

José Dapena Paz 
November 8, 2018 at 9:53 AM

Copying here my comments from :

For json, webOS library is libpbnjson. It provides C++ API and it also includes boost dependency. So IMHO:

  • We should use libpbnjson. webOS library is libpbnjson. It provides C++ API and it looks it should be good enough for our purpose.

  • We should add the dependency on boost (libpbnjson already depends on it).

  • We need to assume compatibility with GCC 6.4 (webOS OSE) and 7.x (flounder). So no std::variant. And, if we use std::filesystem we need to support both std::experimental::filesystem and std::filesystem. Maybe a better solution is just using for now boost::FileSystem so we can move later to standard library flavour.

Then

libpbnjson may not be such a good option. All the building boilerplate both in cmake scripts and yocto are webOS dependent. So, or we provide a webOS-less libpbnjson, or we need something else. The other json implementation that is available in webOS OSE is json-c. It is not a so convenient API, but still it should be valid. So the task for json replacement will need a subtask for analysing the choices.

And last:

It looks like the option with less friction would be jsoncpp. It is C++ API that is in most ways similar to the Qt one (or easier). Only problem is that the reader and writer APIs are not as simple as in Qt, so some helpers could be useful for WAM needs. Yocto recipe is available in Poky master, and putting it as is in meta-agl-lge recipes-devtools works.

 

We'd still need to check json-c and decice which one works best. This needs to be agreed with LGE team.

Fixed

Details

Assignee

Reporter

Labels

Contract ID

Priority

Created November 8, 2018 at 9:47 AM
Updated February 11, 2019 at 11:11 PM
Resolved November 8, 2018 at 12:30 PM