5 Matching Annotations
  1. Feb 2023
    1. <table><tbody><tr class="evn"><td> XPath </td><td> JSONPath </td><td> Description </td></tr> <tr class="odd"><td> / </td><td> $ </td><td class="lft">the root object/element </td></tr> <tr class="evn"><td> . </td><td> @ </td><td class="lft">the current object/element </td></tr> <tr class="odd"><td> / </td><td> . or [] </td><td class="lft">child operator </td></tr> <tr class="evn"><td> .. </td><td> n/a </td><td class="lft">parent operator </td></tr> <tr class="odd"><td> // </td><td> .. </td><td class="lft">recursive descent. JSONPath borrows this syntax from E4X. </td></tr> <tr class="evn"><td> * </td><td> * </td><td class="lft">wildcard. All objects/elements regardless their names. </td></tr> <tr class="odd"><td> @ </td><td> n/a </td><td class="lft">attribute access. JSON structures don't have attributes. </td></tr> <tr class="evn"><td> [] </td><td> [] </td><td class="lft">subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator. </td></tr> <tr class="odd"><td> | </td><td> [,] </td><td class="lft">Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set. </td></tr> <tr class="evn"><td> n/a </td><td> [start:end:step] </td><td class="lft">array slice operator borrowed from ES4. </td></tr> <tr class="odd"><td> [] </td><td> ?() </td><td class="lft">applies a filter (script) expression. </td></tr> <tr class="evn"><td> n/a </td><td> () </td><td class="lft">script expression, using the underlying script engine. </td></tr> <tr class="odd"><td> () </td><td> n/a </td><td class="lft">grouping in Xpath </td></tr></tbody></table>
  2. Sep 2022
    1. JSONPath contains verbiage that allows for an empty array to be returned in the case that nothing was found, but the primary return in these cases is false.

      annotation meta: may need new tag:

      distinction between nothing, false, and empty array

      verbiage that allows for ...