rapture icon indicating copy to clipboard operation
rapture copied to clipboard

document how to parse a case class with rapture-json 2

Open tyrcho opened this issue 7 years ago • 0 comments

I've tried to migrate my sample to rapture 2.0 M9 but I cannot find the correct way to do it, here is a minimalist sample: https://github.com/tyrcho/rapture-json-demo/blob/rapture_2/src/main/scala/Demo.scala

this code worked with rapture 1.1 (my master branch)

Json.parse(string).as[Person]

but fails with rapture 2 (branch rapture_2):

Error:(16, 32) not enough arguments for method as: (implicit ext: rapture.data.Extractor[Demo.Person,rapture.json.Json], implicit mode: rapture.core.Mode[rapture.data.Data#as])mode.Wrap[Demo.Person,ext.Throws].
Unspecified value parameters ext, mode.
  val p = Json.parse(string).as[Person]

tyrcho avatar Feb 19 '18 15:02 tyrcho