Skip to content

Instantly share code, notes, and snippets.

@kolemannix
Created November 29, 2018 13:06
Show Gist options
  • Save kolemannix/0b442cc86acd71cb4dc313693d63c889 to your computer and use it in GitHub Desktop.
Save kolemannix/0b442cc86acd71cb4dc313693d63c889 to your computer and use it in GitHub Desktop.
object Serializer {
def serialize[A, F[_]](value: A)(implicit serde: SafeSerializable[A, F]): F[Array[Byte]] = serde.serialize(value)
def deserialize[A, F[_]](bytes: Array[Byte])(implicit serde: SafeSerializable[A, F]): F[A] = serde.deserialize(bytes)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment