diff options
| author | Joey Adams | 2010-07-23 21:13:59 +0000 |
|---|---|---|
| committer | Joey Adams | 2010-07-23 21:13:59 +0000 |
| commit | f5cbbbe875326dbe5d0c43bc3c692f64f77a30bd (patch) | |
| tree | af65a7ecd05468d504710227f4d2f34a75a044a5 /jsonpath.h | |
| parent | d60f4513e9490b2a0734f69f9de0bc92d8a874b4 (diff) | |
* JSONPath index subscript no longer extracts chars from strings.
* char() method added to JSONPath for extracting chars from strings.
Although index subscripts (those using an integer) extract characters from
strings in Stefan Goessner's JSONPath, and although it works that way in
JavaScript, I believe it is rather illogical and unexpected in the context
of JSONPath, and a poor use of the [] real estate.
Because extracting characters from strings can still be useful, I have added
a char() method for this. I implemented it now to prevent the supporting code
for character extraction from wasting away.
Diffstat (limited to 'jsonpath.h')
| -rw-r--r-- | jsonpath.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -9,7 +9,8 @@ typedef enum { JP_ROOT, JP_WILDCARD, JP_INDEX_SUBSCRIPT, - JP_KEY_SUBSCRIPT + JP_KEY_SUBSCRIPT, + JP_CALL_CHAR } jp_element_type; typedef struct { |
