case classJsonPath(json: JsValue) extends Product with Serializable
An implementation of JSONPath that follows the semantics described by Stefan Goessner
on his blog.
Adopt from https://github.com/josephpconley/play-jsonpath
This parser supports all queries except for queries that rely on expressions of the underlying language
like $..book[(@.length-1)]. However, there’s usually a ready workaround as you can execute the same query
using $..book[-1:].
One deviation from JSONPath is to always flatten the results of a recursive query. Using the bookstore example,
typically a query of $..book will return an array with one element, the array of books. If there was another book
array somewhere in the document, then $..book will return an array with two elements, both arrays of books.
However, if you were to query $..book[2] for our example, you would get the second book in the first array,
which assumes that the $..book result has been flattened. In order to make recursion easier and the code simpler,
we always flatten the result of recursive queries regardless of the context.
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
An implementation of JSONPath that follows the semantics described by Stefan Goessner on his blog.
Adopt from https://github.com/josephpconley/play-jsonpath
This parser supports all queries except for queries that rely on expressions of the underlying language like $..book[(@.length-1)]. However, there’s usually a ready workaround as you can execute the same query using $..book[-1:].
One deviation from JSONPath is to always flatten the results of a recursive query. Using the bookstore example, typically a query of $..book will return an array with one element, the array of books. If there was another book array somewhere in the document, then $..book will return an array with two elements, both arrays of books. However, if you were to query $..book[2] for our example, you would get the second book in the first array, which assumes that the $..book result has been flattened. In order to make recursion easier and the code simpler, we always flatten the result of recursive queries regardless of the context.