diff --git a/jep-012-raw-string-literals.md b/jep-012-raw-string-literals.md index c3e5665..d572d7b 100644 --- a/jep-012-raw-string-literals.md +++ b/jep-012-raw-string-literals.md @@ -13,7 +13,6 @@ This JEP proposes the following modifications to JMESPath in order to improve the usability of the language and ease the implementation of parsers: - * Addition of a **raw string literal** to JMESPath that will allow expressions to contain raw strings that are not mutated by JSON escape sequences (e.g., “\\n”, “\\r”, “\\u005C”). @@ -288,7 +287,7 @@ There are several alternative approaches that could be taken. ### Leave as-is This is a valid and reasonable suggestion. Leaving JMESPath as-is would avoid -a breaking change to the grammar and users could continue to use multiple +a breaking change to the grammar, and users could continue to use multiple escape characters to avoid delimiter collision. The goal of this proposal is not to add functionality to JMESPath, but rather diff --git a/jep-013-object-manipulation-functions.md b/jep-013-object-manipulation-functions.md index 2e8c4e6..afc86ec 100644 --- a/jep-013-object-manipulation-functions.md +++ b/jep-013-object-manipulation-functions.md @@ -22,7 +22,7 @@ This JEP introduces built-in functions to extract a list of key/value pairs from array[array[any]] items(object $obj) ``` -Returns a an array of key value pairs for the provided object `$obj`. Each pair is a 2-item array with the first item being the key and the second item being the value. This function is the inverse of the `from_items()` function. +Returns an array of key value pairs for the provided object `$obj`. Each pair is a 2-item array with the first item being the key and the second item being the value. This function is the inverse of the `from_items()` function. Note that because JSON hashes are inheritently unordered, the key value pairs of the provided object `$obj` are inheritently unordered. Implementations are not required to return values in any specific order. @@ -82,4 +82,4 @@ Accepts one or more arrays as arguments and returns an array of arrays in which ## Compliance tests -A new `objects.json` file will be added to the compliance test suite. \ No newline at end of file +A new `objects.json` file will be added to the compliance test suite. diff --git a/jep-014-string-functions.md b/jep-014-string-functions.md index 7f1a97e..465c378 100644 --- a/jep-014-string-functions.md +++ b/jep-014-string-functions.md @@ -28,7 +28,7 @@ _Each function signature declares the types of its input parameters. If any type ``` int find_first(string $subject, string $sub[, int $start[, int $end]]) ``` -Given the `$subject` string, `find_first()` returns the zero-based index of the first occurence where the `$sub` substring appears in `$subject` or `null` if it does not appear. If either the `$subject` or the `$sub` argument is an empty string, `find_first()` returns `null`. +Given the `$subject` string, `find_first()` returns the zero-based index of the first occurrence where the `$sub` substring appears in `$subject` or `null` if it does not appear. If either the `$subject` or the `$sub` argument is an empty string, `find_first()` returns `null`. The `$start` and `$end` parameters are optional and allow restricting to the slice `[$start:$end]` the range within `$subject` in which `$sub` must be found. @@ -177,7 +177,7 @@ array[string] split(string $subject, string $search[, number $count]) Given the `$subject` string, `split()` breaks on occurrences of the string `$search` and returns an array. -The `split()` function returns an array containing each partial string between occurrences of `$search`. If `$subject` contains no occurrences of the `$search` string, an array containing just the original `$subject` string will be returned. +The `split()` function returns an array containing each partial string between occurrences of `$search`. If `$subject` contains no occurrences of the `$search` string, an array containing just the original `$subject` string will be returned. If the `$search` argument is an empty string, `split()` breaks on every character and returns an array containing each character from the `$subject` string. Thus, if `$subject` is _also_ an empty string, `split()` returns an empty array. diff --git a/jep-015-string-slices.md b/jep-015-string-slices.md index 42a4c56..93d3a21 100644 --- a/jep-015-string-slices.md +++ b/jep-015-string-slices.md @@ -20,7 +20,7 @@ String manipulation functions are a frequently requested feature to be added to ## Slices -_This section outline word changes to the _Slices_ documentation of the grammar **in bold**._ +_This section outlines word changes to the _Slices_ documentation of the grammar **in bold**._ ```abnf slice-expression = [number] ":" [number] [ ":" [number] ] @@ -44,7 +44,7 @@ Slice expressions adhere to the following rules: - If no `start` position is given, it is assumed to be `0` if the given `step` is greater than `0` or the end of the array **or string** if the given `step` is less than `0`. - If a negative `stop` position is given, it is calculated as the total length of the array **or string** plus the given `stop` position. - If no `stop` position is given, it is assumed to be the length of the array **or string** if the given `step` is greater than `0` or `0` if the given `step` is less than `0`. -- If the given `step` is omitted, it it assumed to be `1`. +- If the given `step` is omitted, it is assumed to be `1`. - If the given `step` is `0`, an error MUST be raised. - If the **object** being sliced is not an array **or string**, the result is `null`. - If the **object** being sliced is an array **or string** and yields no results, the result MUST be an empty array **or empty string**.