Hi François-Xavier,
did you import the predefined JsonFormats with
import DefaultJsonProtocol._
?
I guess that won't be enough, because since you have a Map of type
Map[String, Object] you need a JsonWriter[Object] around. Is Object
really the most concrete type you know for the values in the Map?
Johannes
On Wed, Nov 7, 2012 at 4:18 PM, François-Xavier Thomas
<
fx.t...@gmail.com> wrote:
> Hi all,
>
> In order to send data to an API (
http://trakt.tv/api-docs/movie-seen for an
> example of what I want to send), I created a structure with nested Lists and
> Maps. I do not want to have to create a case class and a JSONFormat object,
> as there's no need to access that particular structure after sending it to
> the server, and the data is not that complicated.
>
> What I would like Spray to do is : traverse the whole structure (a
> Map[String, Object] according to the Scala type system) and output the JSON.
> If needed (but there should be no need to, all the fields are Strings), use
> the toString method to get a String.
>
> What Spray does is : "Error: Cannot find JsonWriter or JsonFormat type class
> for scala.collection.immutable.Map[String,Object]".
>
> Any idea on how to solve that?
>
> Thanks,
> François-Xavier
>
> --
>
>
--
Johannes
-----------------------------------------------
Johannes Rudolph
http://virtual-void.net