which Jerkson version do you use and how have you integrated it? Here
is how I use it:
http://logician.free.fr/index.php/2011/09/16/play-scala-and-json/
Also it may be that you need to create custom de/serializers for Pk for Jerkson.
Manuel
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
here some code that does de/serialization for a BSON ObjectId:
https://gist.github.com/1249014
the principle should be exactly the same for a PK, you can see how the
deserialization is handled in Play itself here:
https://github.com/playframework/play-scala/blob/master/src/play/scalasupport/Binders.scala
though I am not familiar with PK so I have no idea how that should be
handled. looks like you got to return NotAssigned when it's empty and
otherwise... maybe use the Binder's directBind to fetch a value and
return an Id(). not sure.
Also make sure you use your CustomJson singleton in your code for the
Json handling (and not the jerkson default one).
hope this helps,
Manuel
case class Thing(id: Option[ObjectId] = None, name: Option[String] =
Some("default"))
Manuel