Created
January 6, 2016 17:09
-
-
Save easel/3972559a161b1cd4420c to your computer and use it in GitHub Desktop.
Circe Play Writable's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CirceWritable { | |
implicit def contentTypeOf_CirceJson(implicit codec: Codec): ContentTypeOf[io.circe.Json] = { | |
ContentTypeOf[io.circe.Json](Some(ContentTypes.JSON)) | |
} | |
implicit def writeableOf_CirceJson(implicit codec: Codec): Writeable[io.circe.Json] = { | |
Writeable(obj => codec.encode(obj.noSpaces)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment