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
Source: stackoverflow.com
Related Query
- How do I parse the json in scala
- SCALA How to parse json back to the controller?
- how to parse the wiki infobox json with scala spark
- How to parse JSON in Scala using standard Scala classes?
- How can I construct and parse a JSON string in Scala / Lift
- Can I use the Scala lift-json library to parse a JSON into a Map?
- How to use Spark SQL to parse the JSON array of objects
- How to parse JSON with variable keys in Scala Play?
- How to parse json list or array in scala for play framework 2.2
- How do I parse a mutableList in scala as JSON on play framework 2.0?
- How to parse an array of json in scala play framework?
- Scala - How to get the Max value of a Json field?
- How to let Spark parse a JSON-escaped String field as a JSON Object to infer the proper structure in DataFrames?
- How to parse a JSON object (which is a list) into simple Scala class objects in scala?
- In Scala what is the easiest way to parse json and map to objects?
- How to parse a JSON Scala without case classes
- How to parse Json data returned from a HTTP request in scala
- Scala - how to take json as input arguments and parse it?
- How to read json array in scala using the Play framework
- how to parse a complicated json in Scala
- how to parse nested json array in scala
- Parse json array to a case class in scala using playframework with the fields in json not matching the fields in case class
- How to parse Json in scala
- How to Parse Json String received from HTTP and loop through the values
- Using scala play-json 2.4.x, how do I extract the name of a json object into a different object?
- How to parse a trait and objects to JSON in Scala Play Framework
- How to read json with the given structure on scala play?
- How to test my scala json after creating the implicit classes
- How to group certain column, and fetch the whole row as a JSON String in Scala Spark?
- How to parse dynamic Json with dynamic keys inside it in Scala
More Query from same tag
- Scala underscores in names
- Enumerating attached DVD drives in Linux / Java / Scala
- Dependency conflict resolution in Play framework
- error: not found: value sc
- In Scala can I implement a def with a case class?
- Scala - Shift element pairs in a list
- Efficiently find overlapping JodaTime Intervals
- Using Spark Data Frame or GlobalTempView with PySpark
- Maintain order in .groupBy() operation of Scala collection
- GROUP BY without aggregate function in SparkSQL
- Implement a new feature with loose coupling
- akka: how to test that an actor was stopped
- Functions without arguments, with unit as argument in scala
- How to use fold to do boolean testing
- Translating custom type from F# to Scala
- Filter RDD of tuples from another list of tuples
- scala copy update fields into case classes
- Copy objects with collections in scala
- IntelliJ Scala Case Class Indentation
- Scala CSV-like data source to flat json representation
- Is there a more idiomatic way to simplify the results of a leftJoin?
- Scala: Defining a function to be the correct type
- Scala generics: Int not conforming to Comparable?
- Scala Summing Values of a list of Tuples in style (String,Int) based on _._1
- How to get counter of each word in windowed stream on Flink
- Why do SparkSQL UDF return a dataframe with columns names in the format UDF("Original Column Name")?
- Jackson scala module writes None as null?
- unix_timestamp() function changes hour in scala spark
- Accessing nested list items in an interpolated string using dot notation in Scala
- Akka - when should I use the Bootable class