P0lip / nimma

Scalable JSON Path engine.
Apache License 2.0
14 stars 7 forks source link

JSON Path is getting an IETF spec! #10

Open gregsdennis opened 1 year ago

gregsdennis commented 1 year ago

It looks like the spec draft that you've based your implementation on is old. Check out the details at https://github.com/ietf-wg-jsonpath/draft-ietf-jsonpath-base. There have been quite a few changes (with good reason) since you last looked.

Mainly:

Also, I would recommend hiding JsonPath-Plus features behind a default-off configuration option to align with the spec.

There's also a comparison website which lists a bunch of paths and various implementations' results. I've added an issue to add this lib. I'll be working on it (I am not a JS dev), but if you want to add it yourself, feel free. It'd be great to have another implementation there.

And if you want to join in the coversation for developing the spec, you'd be welcome!

gregsdennis commented 8 months ago

JSON Path now has an RFC!

https://www.rfc-editor.org/rfc/rfc9535.html

P0lip commented 8 months ago

Hey! Yup, I'm following the progress. I have an almost spec-compliant parser ready and will need to adjust the codegen later on. I don't know the timeline yet, but I'd really like to complete that work some time this year, hopefully before the spec is final. At this point, I'm still not fully confident I'll add support for functions that take NodesType, but let's see. The parser itself will follow the official grammar.

I'll certainly hide JSONPath-plus additions behind the flag as I'm not a huge fan of them. The only reason I added them in the first place was because of https://github.com/stoplightio/spectral.

gregsdennis commented 8 months ago

Yeah, I understand having a large client like that can drive features. Let's hope they get on board.

We're also putting together a test suite. I don't think it can be "official," but the people who worked on the spec are building it, so that's close enough.