diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp index 4a1a7574b4c..9bbde8a4670 100644 --- a/src/plugins/debugger/debuggerprotocol.cpp +++ b/src/plugins/debugger/debuggerprotocol.cpp @@ -855,8 +855,14 @@ void DebuggerCommand::arg(const char *name, const QJsonValue &value) static QJsonValue translateJsonToPython(const QJsonValue &value) { - // TODO: Verify that this covers all incompatibilities between python and json. + // TODO: Verify that this covers all incompatibilities between python and json, + // e.g. number format and precision + switch (value.type()) { + // Undefined is not a problem as the JSON generator ignores that. + case QJsonValue::Null: + // Python doesn't understand "null" + return QJsonValue(0); case QJsonValue::Bool: // Python doesn't understand lowercase "true" or "false" return QJsonValue(value.toBool() ? 1 : 0);