齐木木
New Contributor III

code:

var str="{\"app_type\":\"installed-app\"}"
    import com.fasterxml.jackson.databind.ObjectMapper
    import com.fasterxml.jackson.module.scala.DefaultScalaModule
    val mapper = new ObjectMapper()
    mapper.registerModule(DefaultScalaModule)
    val rmodel=mapper.readValue(str, classOf[appDeeplink])
    println(rmodel)
import com.fasterxml.jackson.annotation._
 
 
@JsonIgnoreProperties(ignoreUnknown = true)
case class appDeeplink(
                        @JsonProperty("app_type") app_type: String
                      ) 

View solution in original post