score:0

according to your json sample page_section is indeed a json list, so it's reasonably deserialized as scala list. if you're sure it's always either one or zero elements list and you're willing to convert it to a case class instead of map, you can use custom fieldserializer which will transform jarray to either jstring or jnull and in case class that's going to be an option[string] field

see json4s docs for more details https://github.com/json4s/json4s#serializing-fields-of-a-class


Related Query

More Query from same tag