We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03fb103 commit 242d713Copy full SHA for 242d713
include/utils/jsonschema/QJsonUtils.h
@@ -180,7 +180,13 @@ class QJsonUtils
180
path.takeFirst(); //Remove first item of path
181
QJsonValue subTarget;
182
modifyValue(subValue, subTarget, path, newValue);
183
- targetObj.insert(key, subTarget);
+
184
+ //Ignore elements with null values
185
+ if (subTarget != QJsonValue::Null)
186
+ {
187
+ targetObj.insert(key, subTarget);
188
+ }
189
190
foundKey = true;
191
}
192
else
@@ -243,7 +249,11 @@ class QJsonUtils
243
249
244
250
245
251
{
246
- target = source;
252
+ //Do not add elements being null
253
+ if (newValue != QJsonValue::Null)
254
255
+ target = source;
256
247
257
248
258
259
0 commit comments