Hello,
I'm using akka persistence and am serializing all of my events into JSON
using the play-json library. For the most part this has been smooth
sailing, however I can't seem to figure how to do this with ActorRef's - it
may not be possible with how I'm trying to do it.
Here is what I have thus far:
implicit val actorRefFormat: Format[ActorRef] = new Format[ActorRef] {
def reads(json: JsValue): JsResult[ActorRef] = {
JsSuccess(Actor.noSender) // ???
}
def writes(o: ActorRef): JsValue = {
val identifier = Serialization.serializedActorPath(o)
Writes.StringWrites.writes(identifier)
}
}
It seems the `Writes` will work because it doesn't depend on having an
`ActorSystem` in scope. How would I do this for the `Read`?
Thanks!
-Chris
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.