-
Notifications
You must be signed in to change notification settings - Fork 3
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
Enhancement: add jval(1) tool that uses the XPath for JSON to analyse, transform and selectively extract data from JSON #10
Comments
Thanks! I will look at this in more detail later on today. I have some other things I have to do and then I will look at the other issues and then this before I take care of some other things. I know you are contemplating other tools but do we want the others from before so we have all three: jval, jnamval and jfmt ? |
Ah: I see! That other issue suggests that some of those tools might not be needed. Okay well we will discuss these things before we work on the actual tools. Back later. |
Oh as far as XPath and XML: I have used XML extensively before. I used the library libxml2 though I know that nowadays some of the functions I used back then are considered deprecated. Well anyway I have a number of things to do before I can get to this issue but I think it's great so far. |
BTW: please feel free to open a pull request with the updates to the JSON util README file. |
Please remind me about this if I do not get to it sometime soon: say in the next day or at most two days. I need to take care of some other things first and depending on how long that takes and how I feel I might not be able to address this (maybe I'll be able to look at the prep.sh script in the mkiocccentry repo or this one too, for instance). Do you wish to be assigned this too? I figure we probably will both work on this tool but it doesn't matter to me if you're assigned or not: I leave that up to you. I'll assign it to me in any case and then have things I have to do I'm afraid. |
While we are happy to develop the concept (and more is needed), we can leave the coding to you. UPDATE 0And will be happy to advise and test. |
Sure. But if you want at some point or it seems necessary (for some reason that's unforeseen at this time) you can help out (of course). Even so regardless of that I'll put in the top comments the usual about the parser and the tools, the co-developed part, as it is a joint effort. But yes please do further the concept and then later on (after IOCCC28 I guess) we can start to work on this and the other tool. Which reminds me. Do you want to bring in |
Our guess is that This is probably rather different than Thus, we advise to keep these issues separate. |
Just wanted to be sure. I don't mind either way. |
We recommend this JSONPath Outline Evaluator as a tool to evaluate/test/try the XPath for JSON. |
I guess we'll be talking about this in more details later on but it's nice to have a tool to evaluate things too. Thanks. |
Is there an existing issue for this?
Describe the enhancement
We recommend adding a
jval(1)
tool to allow one to analyse, transform and selectively extract data from a JSON document.This tool should use the XPath for JSON model.
FYI: XPath is a general model that allows one to analyse, transform and selectively extract data from XML. The above mentioned XPath for JSON applies that model to JSON: often called JSONPath.
There exist several implementations JSONPath. For example, the "outer repo" uses JSONPath.sh as a
bash(1)
implementation of JSONPath. And while that implementation of very slow, it is used by tools such as bin/jval-wrapper.sh and bin/jfmt-wrapper.sh and bin/jprint-wrapper.sh.To speed up the above mentioned wrapper tools, a
jval(1)
tool needs to be created that uses the same XPath for JSON model used by the very slow JSONPath.sh.Relevant images, screenshots or other files
We recommend the following command line for
jval(1)
:A good resource for JSONPath Syntax and Semantics is RFC9535.
NOTE: We are still considering additional command line options. One such possibility comes from the jsonpath-cli facility and some of its
jpp(1)
options. See also the jsonpath-cli repo.Another XPath for JSON implementation and possible command line model is jsp.
Relevant links
See RFC9535 for an overview of JSONPath Syntax and Semantics.
The XPath of JSON is one of the original descriptions for how XPath would apply to JSON.
See How to use JSON Path for examples of how to use
jpp(1)
(see jsonpath-cli).This issue was inspired by the obsolete issue #523 from the mkiocccentry repo.
Anything else?
We will fill out this section as the above command line model is improved.
Stay tuned for more updates!
The text was updated successfully, but these errors were encountered: