mwhooker / jsonselect

Python implementation of jsonselect (http://jsonselect.org/)
ISC License
26 stars 6 forks source link

:first-child does not behave like the demo #5

Closed progval closed 9 years ago

progval commented 9 years ago

On the demo website you can do .drinkPreference :first-child to get the first child, whatever its type ("whiskey").

However, this implementation does not behave this way: unless a type is given, it does not return anything.

$ python -m jsonselect ".drinkPreference :first-child" conformance_tests/upstream/level_1/basic.json
$ python -m jsonselect ".drinkPreference string:first-child" conformance_tests/upstream/level_1/basic.json
"beer"
progval commented 9 years ago

Update: I edited my initial message to make it clearer what the issue is

mwhooker commented 9 years ago

Dupe of #1