-
Notifications
You must be signed in to change notification settings - Fork 103
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
refactor: use deserialize_str
instead
#527
Conversation
Thanks! Just curious: for bincode though, wouldn't you want to use bytes instead of str for the repr? AFAIK On the serialization side, the only option is to use newtypes (e.g. On the deserialization side, either use the newtype option, or just go with |
Or, of couse, you can always mark all your |
Ideally yes
I could do this but i dont quite like having to tag
i just found out about if deserializer.is_human_readable() {
deserializer.deserialize_any(FieldElementVisitor)
} else {
deserializer.deserialize_bytes(FieldElementVisitor)
}
} deserializer like this is also what |
Thanks! I didn't know that. This is sorta a breaking change though. Non-human-readable self-describing formats used to be serialized as strings but now they use bytes. Files previously saved with such a format will become unreadable. I guess we can do this with a breaking semver bump. |
I'm happy to contribute on that if you're okay with the approach. |
Yeah that's certainly a good approach. We just need to bump a breaking version with this change. |
@kariy This from |
Resolves #526