I have a usecase where incoming json string doesn't have a structure similar to the case class. I have following case classes:
case class Parent(children: Seq[Child])
case class Child(name: Option[String], age: Option[Int])
User inputs in Parent field as:
John:20, Peter:12
Incoming json is as:
{"parent":{"parent":"John:20, Peter:12"},....}
Is it possible I write json formatter to map this to the Parent case class with nested Child list, using play framework json API?