Skip to content
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

Support generic custom serialization #618

Closed
s-ludwig opened this issue Apr 14, 2014 · 3 comments
Closed

Support generic custom serialization #618

s-ludwig opened this issue Apr 14, 2014 · 3 comments
Milestone

Comments

@s-ludwig
Copy link
Member

Currently there are three ways to customize how a type gets serialized: toString/fromString, toJson/fromJson and toBson/fromBson

It would be nice to have a way to customize the result without using a specialized output format. An idea could be to support arbitrary T serialize() and deserialize(T) methods, where T is the representation type that gets serialized.

See also #617

@UplinkCoder
Copy link
Contributor

We already have vibed.data.serialization.
It also implicitly defines a serialization interface.

@s-ludwig
Copy link
Member Author

Implemented by 7d22466. Possibly there is still a better name than toSerializedValue.

@UplinkCoder, I think I just didn't express myself well. This not about serialization per se, but about defining a different representation of a value, that forms the basis for serialization.

@s-ludwig s-ludwig added this to the 0.7.20 milestone May 16, 2014
@s-ludwig
Copy link
Member Author

Maybe a better name: toRepresentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants