New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add developer doc explaining serialization #2548
Conversation
docs/dev/serialization.md
Outdated
|
||
When writing JSON, Cirq checks if the given object has a `_json_dict_` method. | ||
If it does, the object is replaced by the output of that method. | ||
Otherwise there are a series of several hardcoded cases for complex numbers, numpy arrays, sympy expressions, and a few others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think it should be "Otherwise, there are..." with a comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
how to remove a serializable object from cirq while maintaing backwards compatibility with old serialized files, | ||
and various related guidelines. | ||
|
||
## Exposed API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: should there be a short background doc to explain why we want/need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool. I imagine this will be very helpful
Nit: I'm confused by the line wrapping in this file. It seems to be by sentence, except when it isn't
It line wraps at the end of sentences and also when the length gets too long. I wrote it in github's editor so I didn't have the 80 column guide. |
Automerge cancelled: A status check is failing. |
No description provided.