WAM: jsoncpp shows warnings opening applications in log

Description

After moving to use jsoncpp, apparently things are working as expected. Though, we see warnings in /var/log/message launching applications:

This seems to be caused by using reader on empty string on most cases. Though in one case (m_groupWindowDesc) it is because we get a "null" string, that does not qualify as valid json either.

Environment

None

Attachments

2

Activity

Walt Miner 
February 11, 2019 at 11:11 PM

Close for FF 6.0.4 and GG 7.0.0

Nick Yamane 
November 15, 2018 at 5:16 PM

Fixes landed in 02a3b06ed9425.

Nick Yamane 
November 15, 2018 at 3:23 PM

I've just been able to reproduce the exact scenario you reported. It took longer than I expected because it seems your build have a slightly differen Jsoncpp version (1.8.3, while it should be 1.8.4). 1.8.3 version had this line which produces those "warning" messages when trying to parse empty strings (for example).

Just updated (and attached

) the minimal sample project with new sample and solution to get Jsoncpp implementation behaving just like QJson approach when parsing empty strings.

Finally preparing a patch to submit to fix this issue.

José Dapena Paz 
November 14, 2018 at 1:02 PM

< Yes, let's fix those cases.

Nick Yamane 
November 14, 2018 at 12:07 PM

Regarding the "null" string case for `m_groupWindowDesc` variable:

  • Basically, we want to serialize (as JSON) a sub-object (obj["windowGroup"] field, among others) into the string variable m_groupWindowDesc;

  • In previous Qt-based implementation, even when that field (windowGroup) was not present the result was an empty JSON Object (as string, represented by "{}"), while in the current Jsoncpp-based one it's ending up with "null" string;

The minimal example I've implemented to compare the behavior of QJson and Jsoncpp (attached

) shows we need a special handling for this cases when that field is not present in the JSON object, which seems to be the case for WebApps we're testing.

If you agree , I'll prepare a patch to fix those cases in flounder branch.

Fixed

Details

Assignee

Reporter

Labels

Contract ID

Components

Priority

Created November 14, 2018 at 9:03 AM
Updated February 11, 2019 at 11:11 PM
Resolved November 15, 2018 at 5:23 PM