class cirq.SupportsJSON(*args, **kwds)[source]

An object that can be turned into JSON dictionaries.

The magic method json_dict must return a trivially json-serializable
type or other objects that support the SupportsJSON protocol.
During deserialization, a class must be able to be resolved (see
the docstring for read_json) and must be able to be (re-)constructed
from the serialized parameters. If the type defines a classmethod
_from_json_dict_, that will be called. Otherwise, the cirq_type key
will be popped from the dictionary and used as kwargs to the type’s
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.