Skip to content

Recursive descent is not supported #67

Description

@iaik-jheher

The recursive descent operator does not appear to be implemented.

For example, $..name should find $.name, but also $.children[0].name, $.children.children.children[0].name, ...

In test case form:

@Test
fun recursiveDescentTest() {
    val obj = buildJsonObject {
        put("name", "Name #1")
        put("addr", "Street 1")
        putJsonArray("children") {
            addJsonObject {
                put("name", "Name #2")
            }
        }
    }
    assertEquals(setOf("Name #1", "Name #2"),
        JsonPath.pathEvery("$..name").getAll(obj).map { it.toString() }.toSet())
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions