Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created January 5, 2017 21:25
Show Gist options
  • Save zeryx/ad79ac8a0a6ac744f7e455a091c3f0fd to your computer and use it in GitHub Desktop.
Save zeryx/ad79ac8a0a6ac744f7e455a091c3f0fd to your computer and use it in GitHub Desktop.
//converts any serializable class into json using shapeless
def Write[A](input: A): Json = {
val encoder = EncodeJson.of[A]
val json = encoder(input)
json
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment