Dynamic fields to Json in Scala


We have faced a situation where we needed to create Json representation for a dynamic set of fields & their values which represented by a Map[String, String]. Example: Scala class case class Person(name: String, age: String, customFields: Map[String,String]) Default Json representation of above class will be: { “name”: “anil”, “age”: “30”, “customFields”: { “field1”: “value1”,… Read More Dynamic fields to Json in Scala