JSON path expressions \ and \\ should return JSON value instead of JField
Currently JField is returned which does not make any sense, it just complicates the usage of path expressions. For instance instead of this
the expression should work as
After the change path expressions work more nicely with other features like extraction:
val JField("bar", JInt(x)) = json \ "foo" \ "bar"
the expression should work as
val JInt(x) = json \ "foo" \ "bar"
After the change path expressions work more nicely with other features like extraction:
val json = parse(""" { "operations" : [ ........]} """)
(json \ "operations").extract[List[Operation]]
Leave a comment