jsonselect icon indicating copy to clipboard operation
jsonselect copied to clipboard

Add support for Level 3

Open prologic opened this issue 12 years ago • 8 comments

Adding support for Level 3 would be nice. I plan to evaluate the use of your library in a production project at work. The spec seems fairly clear to me on Level 3 aspects. Not sure on "expressions" though.

prologic avatar Nov 28 '13 05:11 prologic

Hi @therealprologic,

funny you should mention it. level 3 is something I plan on implementing this weekend.

@latestrevision implemented the level in go, which should be quite transferrable https://github.com/latestrevision/go-jsonselect

He also pointed me to this article which I hope should clear things up http://lloyd.io/jsonselect-grows-up

In the mean time, don't let me stop you from contributing any fixes you see

mwhooker avatar Nov 28 '13 05:11 mwhooker

Thats fantastic news, Look forward to it!

Sent from my iPad

On 28 Nov 2013, at 15:53, Matthew Hooker [email protected] wrote:

Hi @therealprologic https://github.com/therealprologic,

funny you should mention it. level 3 is something I plan on implementing this weekend.

@latestrevision https://github.com/latestrevision implemented the level in go, which should be quite transferrable https://github.com/latestrevision/go-jsonselect

He also pointed me to this article which I hope should clear things up http://lloyd.io/jsonselect-grows-up

In the mean time, don't let me stop you from contributing any fixes you see

— Reply to this email directly or view it on GitHubhttps://github.com/mwhooker/jsonselect/issues/1#issuecomment-29441878 .

prologic avatar Nov 28 '13 06:11 prologic

Hi @mwhooker just wondering if you are still working on this or have lost a bit of interest? Curious more than anything :)

prologic avatar Jun 04 '14 00:06 prologic

FAIL tests/test_conformance.py::test[level_3_basic_multiple-has-with-strings]
FAIL tests/test_conformance.py::test[level_3_expr_greater-than]
FAIL tests/test_conformance.py::test[level_3_expr_less-than]
FAIL tests/test_conformance.py::test[level_3_expr_mod]
FAIL tests/test_conformance.py::test[level_3_expr_mult]
FAIL tests/test_conformance.py::test[level_3_expr_null-eq]
FAIL tests/test_conformance.py::test[level_3_expr_precedence-2]
FAIL tests/test_conformance.py::test[level_3_expr_simple-false]
FAIL tests/test_conformance.py::test[level_3_polykids_val]

So I've been trying to work on this but running into several issues:

  • The context free grammar that jsonselect.org defines is probably more complex than what re.Scanner can provide... I'm tempted to use a proper parser such as rply, funcparserlib, pyparsing, etc.

prologic avatar Jun 09 '14 22:06 prologic

ping @mwhooker

prologic avatar Jun 09 '14 22:06 prologic

Since this project seems to have stalled, I've created a new one: pyjsonselect. It's based on the JS reference implementation and hence is fully conformant with all levels of the spec. If you need the level 3 selectors, you may wish to give it a try.

danvk avatar Oct 06 '14 22:10 danvk

Hi All,

sorry for the radio silence. I'm no longer maintaining this, as there are far better solutions, such as http://www.jsoniq.org/ and https://github.com/boto/jmespath and now @danvk's pyjsonselect.

mwhooker avatar Oct 07 '14 00:10 mwhooker

Awesome! Thanks guys :) I'll check these out!

James Mills / prologic

E: [email protected] W: prologic.shortcircuit.net.au

On Tue, Oct 7, 2014 at 10:43 AM, Matthew Hooker [email protected] wrote:

Hi All,

sorry for the radio silence. I'm no longer maintaining this, as there are far better solutions, such as http://www.jsoniq.org/ and https://github.com/boto/jmespath and now @danvk https://github.com/danvk's

pyjsonselect https://github.com/boto/jmespath.

— Reply to this email directly or view it on GitHub https://github.com/mwhooker/jsonselect/issues/1#issuecomment-58121860.

prologic avatar Oct 07 '14 08:10 prologic