How to serialize an akka "actorRef" that is part of a case class using JsonFormat custom serializer from spray-json?

Viewed 305

I need to create a spray-json implicit conversion for a case class that looks like:

case class ExampleCaseClass(identified: String, actor: ActorRef)

I have been using spray-json to do all of my serialization but I haven't seen anywhere online that explains how to create the JsonFormat implicit conversion for the ActorRef type.

I would really appreciate it if someone could help me out with this, or even just point me in the direction of where I could possibly find the answer.

Many thanks in advance.

1 Answers

According to this documentation this works out of the box with Jackson but you need to write a custom serializer for spray.

Related