I have a Json string in the format:
{
"id": {
"1": {
"name": "Andrew",
"age": 12,
"alive": "yes"
},
"2": {
"name": "Susan",
"age": 14,
"alive": "yes"
}
}
}
What is the best way to convert this into a case class in Scala?
The case class would be in the following format:
case class JsonParent(key:String, jsonNested : List[JsonChild] )
case class JsonChild(key:String, jsonNested1 : List[JsonChildValues])
case class JsonChildValues(name:String, age:Int, alive:Boolean)
Is this possible, if so what would be the best way to do it?