Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support recursive descent JsonPath syntax (and lens) #29

Open
johnspaul opened this issue Jul 18, 2017 · 1 comment
Open

Support recursive descent JsonPath syntax (and lens) #29

johnspaul opened this issue Jul 18, 2017 · 1 comment

Comments

@johnspaul
Copy link

johnspaul commented Jul 18, 2017

Hi ,

I have a scenario in my application , where i have to recusrively get all the data, and i tried to use the jsonPath $.store.book[*].subBooks[*]..author as mentioned in http://goessner.net/articles/JsonPath/ . But i am getting an error while parsing. I tested the same using some online parsers and it is working fine. I would like to know if this is the right syntax to be used in JsonLenses. Please let me know if am missing some thing.

{ 
"store": {
    "book": [
      { "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95,
        "subBooks": [
          { "category": "fiction",
            "author": "Evelyn Waugh",
            "title": "Sword of Honour",
            "price": 12.99,
            "isbn": "0-553-21311-3",
            "subBooks": [
          { "category": "fiction",
            "author": "Evelyn Waugh",
            "title": "Sword of Honour",
            "price": 12.99,
            "isbn": "0-553-21311-3"
          }
        ]
          }
        ]
      },
      { "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99,
        "isbn": "0-553-21311-3"
      }

    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  }
}

Regards
Johns

@jrudolph jrudolph changed the title Recursive descent not working($.store.book[*].subBooks[*]..author) Support recursive descent JsonPath syntax (and lens) Jul 18, 2017
@jrudolph
Copy link
Owner

jrudolph commented Jul 18, 2017

Hi @johnspaul, yes that's correct, recursive decent is currently not supported. IIRC neither in json path nor in json-lenses themselves.

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

No branches or pull requests

2 participants