How can I JSON serialize a QVariant (or other type of data) in Qt. I don't want to use an external third party library like QJson
相关问题
- Jackson Deserialization not calling deserialize on
- Sorting 3 numbers without branching [closed]
- How to maintain order of key-value in DataFrame sa
- QML: Cannot read property 'xxx' of undefin
- StackExchange API - Deserialize Date in JSON Respo
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- json_encode 没有把数组转为json
- Livy Server: return a dataframe as JSON?
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
See this JSON Save Game example on serialization of an object to a JSON document.
There are no internal tools in Qt to do it. You will have to use a lib. Or roll your own implementation
Just to mention, as of Qt5, JSON is officially supported:
JSON Support in Qt
Parsing JSON with QT using standard QT library.
BTW: why don't you want to use QJson? It nicely encapsulates all the QScriptValueIterator stuff, making your code easier to read.