kotlinx-serialization-jsonpath icon indicating copy to clipboard operation
kotlinx-serialization-jsonpath copied to clipboard

Does the library support JsonPath functions like `keys()`?

Open toddobryan opened this issue 2 years ago • 1 comments
trafficstars

If so, how do I access them?

toddobryan avatar Apr 20 '23 21:04 toddobryan

Hey @toddobryan,

It currently doesn't, but we can support it. We can build is similar to every but looking into the Keys instead of JsonElement. https://github.com/nomisRev/kotlinx-serialization-jsonpath/blob/29ee6f19026f39a27ca9506565dd0f57a63aa602/src/commonMain/kotlin/io/github/nomisrev/JsonPathEvery.kt#L60

A PR would be welcome, or I can look into it soon to add support for it. You can also be add this in your local project, without waiting on an new version.

nomisRev avatar Apr 21 '23 08:04 nomisRev