Lift-json extract json with 'type' field into a case class

前端 未结 1 936
温柔的废话
温柔的废话 2021-02-19 21:40

I am trying to extract JSON into a case class using lift-json. Here is my case class:

case class Person(name: String, age: Int)

Here is the jso

1条回答
  •  后悔当初
    2021-02-19 22:10

    Backticks allow you to use reserved names.

    case class Person(name:String, age:Int, `type`:String)
    

    0 讨论(0)
提交回复
热议问题