Use QMetaObject associated with your object to query for names of static properties or use QObject::dynamicPropertyNames() for dynamic properties. Then query the object for value of each of the properties and compose a string using the json format.