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

query json in response #40

Open
ZwodahS opened this issue Feb 8, 2017 · 5 comments
Open

query json in response #40

ZwodahS opened this issue Feb 8, 2017 · 5 comments

Comments

@ZwodahS
Copy link

ZwodahS commented Feb 8, 2017

One of the things I am interested in helping is to put a json query language similar to jq into wuzz.

There is already an existing parser at https://github.com/tidwall/gjson.

@Benaiah
Copy link
Contributor

Benaiah commented Feb 8, 2017

Do you mean as an alternative method of searching (as opposed to the existing regex search)? If so, that sounds like a great idea - I'd definitely be interested in that. Not sure how else we could use a jq-like syntax in wuzz - I'd love to hear any suggestions you might have.

@ZwodahS
Copy link
Author

ZwodahS commented Feb 8, 2017

so if the response body is a json like say

{
  "books": [
    { "id": "abc", "name": ... },
    { "id": "cde", "name": ...},
  ]
}

We should be able to query .books.[0] to get the first item or .books.[*].id to get all the id.
This will allow us navigate big json easily.

@asciimoo
Copy link
Owner

asciimoo commented Feb 8, 2017

@ZwodahS agree, it would be useful. README's todo section already contains this feature but with xpath.

@Benaiah
Copy link
Contributor

Benaiah commented Feb 8, 2017

@ZwodahS that's what I thought you meant - that's a great suggestion.

@ZwodahS
Copy link
Author

ZwodahS commented Feb 8, 2017

alrighty, let me see what I can do =).

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

3 participants