--
You received this message because you are subscribed to the Google Groups "Lagom Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framework+unsubscribe@googlegroups.com.
To post to this group, send email to lagom-framework@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/e9a4dec4-d632-4760-a8b1-924d270efa5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Joo,Play only defines a format for Map[String, T]. If you want to support arbitrary formats for the keys of a map, you'll have to define that yourself, eg:implicit val uuidPositionMapFormat: Format[Map[UUID, Position]] = {implicitly[Format[Map[String, Position]]].inmap(_.map {case (key, value) => UUID.fromString(key) -> value
}, _.map {
case (key, value) => key.toString -> value
})}Regards,James
On 12 January 2017 at 22:12, Joo Lee <joo.an...@gmail.com> wrote:
Hello,I am getting an compile error "No Implicit format for Map[java.util.UUID, com.xyz.Position] available"I tried imported the JSON Utils from the online-auction sample, and also imported the play json package in the same module but still getting the same error.Before I write my own custom READ / WRITE formatter, I would like to know if there is an easier way to get around this because I haven't worked with play json framework before.Thanks,Joo
--
You received this message because you are subscribed to the Google Groups "Lagom Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framewo...@googlegroups.com.
To post to this group, send email to lagom-f...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/e9a4dec4-d632-4760-a8b1-924d270efa5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks James.Did you mean to use .map instead of .inmap? It gives a compile error.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framework+unsubscribe@googlegroups.com.
To post to this group, send email to lagom-framework@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/38b3878b-0674-4c40-8f44-f1870fa99f34%40googlegroups.com.