我正在尝试使用 Specs2 测试 Json,但我总是遇到解析错误。
也许是因为我使用了 JObect?
val j: JObject = "hello" -> "world"
j must */("hello")
这是错误:
搜索字段
Could not parse:
JObject(List(JField(hello,JString(world))))
java.lang.Exception: Could not parse:
JObject(List(JField(hello,JString(world))))
at net.liftweb.echidnasearch.QuerySearchSpec$$anonfun$1$$anonfun$apply$124.apply(QuerySearchSpec.scala:496)
at net.liftweb.echidnasearch.QuerySearchSpec$$anonfun$1$$anonfun$apply$124.apply(QuerySearchSpec.scala:485)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
MatchQuery
谢谢