# cirq.testing.assert_json_roundtrip_works¶

cirq.testing.assert_json_roundtrip_works(obj, text_should_be=None, resolvers=None)[source]

Tests that the given object can serialized and de-serialized

Parameters
• obj – The object to test round-tripping for.

• text_should_be – An optional argument to assert the JSON serialized output.

• resolvers – Any resolvers if testing those other than the default.

Raises

AssertionError – The given object can not be round-tripped according to the given arguments.