toJson()

Convert the attribute value to a JSON document (json encoding).

Synopsis:

#include <qpps/variant.h>
 
QJsonDocument toJson( QJsonParseError *error = 0 ) const;

Arguments:

error
A reference to a QJsonParseError object for storing the conversion outcome. When the reference is non-NULL, the object will contain information about any JSON parsing error that may have occurred.

Description:

Convert the attribute value to a JSON document (json encoding).

Returns:

A QJsonDocument containing the attribute's value.