QJsonObject how to create function

174 Views Asked by At

I know how to create members and values in a QJsonObject. What I want to do is create a Json function that when called will call the assigned function.

Is this possible?

1

There are 1 best solutions below

9
On BEST ANSWER

I think that is not possible, functions are not a valid json value.

Valid json values are : string, number, object, array, boolean or null.

In Qt, valid QJsonValues are: bool QJsonValue::Bool, QJsonValue::Double, QJsonValue::String, QJsonValue::Array, QJsonValue::Object, QJsonValue::Null

json spec