代碼:
var str = " {\“app_type \”, \“installed-app \“}”com.fasterxml.jackson.databind進口。objectmap com.fasterxml.jackson.module.scala進口。DefaultScalaModule val mapper = new objectmap () mapper.registerModule (DefaultScalaModule) val rmodel =映射器。readValue (str,名為[appDeeplink]) classOf println (rmodel)
進口com.fasterxml.jackson.annotation。_ @JsonIgnoreProperties (ignoreUnknown = true)案例類appDeeplink (@JsonProperty (“app_type”) app_type:字符串)
代碼:
var str = " {\“app_type \”, \“installed-app \“}”com.fasterxml.jackson.databind進口。objectmap com.fasterxml.jackson.module.scala進口。DefaultScalaModule val mapper = new objectmap () mapper.registerModule (DefaultScalaModule) val rmodel =映射器。readValue (str,名為[appDeeplink]) classOf println (rmodel)
進口com.fasterxml.jackson.annotation。_ @JsonIgnoreProperties (ignoreUnknown = true)案例類appDeeplink (@JsonProperty (“app_type”) app_type:字符串)