这是我的Json
{"preview":false,"offset":0,"result":{"User ID":"ab192013","IP
Address":"101.2.0.11"}}
我有两个案例类
case class Sample(result: Result)
case class Result(`User ID` : String , `IP Address`: String)
object MyResultJsonProtocol extends DefaultJsonProtocol {
implicit val ResultFormat = jsonFormat2(Result.apply)
implicit def sampleFormat[jsonformat] = jsonFormat1(Sample.apply)
}
我无法获得用户ID值
请帮助,我得到以下例外
MalformedContent(Object is missing required member 'User$u0020ID',Some(spray.json.DeserializationException: Object is missing required member 'User$u0020ID'))