set_pragma_json(object_, id, data)#

Serialize a Python object to a JSON document in a textual pragma.

An existing pragma with the same ID is updated with the text or deleted if the object is None or empty.

See the pragma_json example.

Parameters:
object_suite.Object

Element to attach the pragma to.

idstr

ID of the pragma.

dataobject

Python object to serialize to a JSON document.

Returns:
bool

True if the object is modified, False otherwise.