GNOME Bugzilla – Bug 702756
Different outputs from [*] and ['*'] selectors in JSONPath expressions
Last modified: 2017-09-05 10:39:48 UTC
Created attachment 247339 [details] Test code that reads JSON from a file and launches the two queries in question Trying to get the grandchildren in the JSON code below using the selector $['test-root'][*][*] I got unexpected results: { "test-root": { "first-child-object":[ {"grandchild": 1}, {"grandchild": 2} ], "second-child-object":[ {"grandchild": 3} ] } } That selector only returned one element. Nonetheless, the use of the selector $['test-root']['*'][*] returns the three grandchildren objects as expected. I've tried the selector $['test-root'][*][*] with another JSONPath implementation (in particular the PHP implementation via [1]) and both expressions seem to be accepted and equivalent. [1] http://jsonpath.curiousconcept.com/
Created attachment 247340 [details] JSON encoded piece of data as example
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/json-glib/issues/7.