您好我正在尝试使用反射提取 JSON
import net.liftweb.json._
case class Bike(make: String, price: Int) {
def this(price: Int) = this("Trek", price)
}
val cls = Class.forName("Bike")
val manifest = Manifest.classType(cls)
val parsedData =net.liftweb.json.JsonParser.parse(json)
JsonParser.parse(""" {"price":350} """).extract[manifest]
但是我收到此错误:
not found: type manifest
JsonParser.parse(""" {"price":350} """).extract[manifest]
^
虽然清单来自清单类型