2
Readme https://github.com/json4s/json4s#linq-style 의 예제에서 다음 테스트를 실행하려고했지만 빈 목록이 표시됩니다. 나는 결과가 없다 예제에서 지정된 목록 (5, 3)Json4s 'linq-style'for-comprehension 빈 목록 제공
test("JValue with for comprehension") {
import org.json4s._
import org.json4s.native.JsonMethods._
val json = parse("""
{ "name": "joe",
"children": [
{
"name": "Mary",
"age": 5
},
{
"name": "Mazy",
"age": 3
}
]
}
""")
val result = for {JField("age", JInt(age)) <- json} yield age
println(result)
//Output : List()
}