cirq.protocols.json_serialization.get_serializable_by_keys

Returns all SerializableByKeys contained by obj.

Objects are ordered such that nested objects appear before the object they are nested inside. This is required to ensure SerializableByKeys are only fully defined once in serialization.