Module: cirq.protocols.json_serialization

Classes

class CirqEncoder: Extend json.JSONEncoder to support Cirq objects.

class JsonResolver: Protocol for json resolver functions passed to read_json.

class SupportsJSON: An object that can be turned into JSON dictionaries.

Functions

json_serializable_dataclass(...): Create a dataclass that supports JSON serialization

obj_to_dict_helper(...): Construct a dictionary containing attributes from obj

read_json(...): Read a JSON file that optionally contains cirq objects.

to_json(...): Write a JSON file containing a representation of obj.

DEFAULT_RESOLVERS

RESOLVER_CACHE

TYPE_CHECKING False