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

An abstraction over something which can serialize to/from bytes. #66

Open
JakeWharton opened this Issue Jan 8, 2018 · 1 comment

Comments

2 participants
@JakeWharton

JakeWharton commented Jan 8, 2018

I would expect the JSON, ProtoBuf, and CBOR classes to all implement some common type to facilitate serialization to/from a T+KSerializer<T> to bytes. This is needed for something like a Retrofit 2 converter.

Currently you can work around it with extension methods and passing around a pair of method references (but that's super annoying).

@JakeWharton

This comment has been minimized.

Show comment
Hide comment
@JakeWharton

JakeWharton Jan 8, 2018

For now I'm using method references to accomplish this (example 1, example 2) which works, but being able to accept the JSON or ProtoBuf instance directly would greatly improve the converter API.

JakeWharton commented Jan 8, 2018

For now I'm using method references to accomplish this (example 1, example 2) which works, but being able to accept the JSON or ProtoBuf instance directly would greatly improve the converter API.

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