http4s / http4s_demo

See how easy http4s makes life
Other
14 stars 7 forks source link

How to decode json using json4s? #8

Closed wpoosanguansit closed 9 years ago

wpoosanguansit commented 9 years ago

I tried to switched out Argonaut and use json4s instead. I get an error with decoder declaration.

from the call req.decode[Obj] in the method POST,

Error:(37, 57) not enough arguments for method jsonOf: (implicit reader: org.json4s.Reader[Obj])org.http4s.EntityDecoder[Obj]. Unspecified value parameter reader. implicit val objDecoder: EntityDecoder[Band] = jsonOf[Obj] ^ How do I satisfy the implicit reader for the function call? I checked up json4s doc and I do not see that being discussed. So I am not sure how this is intended with http4s. Thanks for your help.

bryce-anderson commented 9 years ago

Reader is defined here.

wpoosanguansit commented 9 years ago

Thanks.