Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QJsonObject.insert("long-name") creates truncated key. How can I get around this?
pokemonsrqt last edited by pokemonsrqt
I have a QJsonObject that already has a key
I use the following statement to replace the value connected to that key:
After this statement has executed the debugger shows that the QJsonObject now has a key with the truncated name
Why is this happening? How can I replace a value without clipping the key?
Sounds like a bug. Which Qt version are you using? What operating system? Can you try some other long string - is behaviour the same?
@pokemonsrqt I doubt the key is really truncated, I guess it is simply the dubugger showing it this way for some reason.
Did you try to print out the Json string?
pokemonsrqt last edited by
I'm using macOS 10.13.6, Qt Creator 4.7.2 and Qt 5.11.2.
The application works, so it seems that it is only the debugger showing the wrong value as @jsulm figured. I won't pursue this issue any further.