Skip to content

Commit 5d0d40c

Browse files
committed
chore: fix some typos in comments
Signed-off-by: rustfix <[email protected]>
1 parent bbf40bb commit 5d0d40c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

SYNTAX.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GJSON Path Syntax
22

3-
A GJSON Path is a text string syntax that describes a search pattern for quickly retreiving values from a JSON payload.
3+
A GJSON Path is a text string syntax that describes a search pattern for quickly retrieving values from a JSON payload.
44

55
This document is designed to explain the structure of a GJSON Path through examples.
66

@@ -15,12 +15,12 @@ This document is designed to explain the structure of a GJSON Path through examp
1515
- [Multipaths](#multipaths)
1616
- [Literals](#literals)
1717

18-
The definitive implemenation is [github.com/tidwall/gjson](https://github.com/tidwall/gjson).
18+
The definitive implementation is [github.com/tidwall/gjson](https://github.com/tidwall/gjson).
1919
Use the [GJSON Playground](https://gjson.dev) to experiment with the syntax online.
2020

2121
## Path structure
2222

23-
A GJSON Path is intended to be easily expressed as a series of components seperated by a `.` character.
23+
A GJSON Path is intended to be easily expressed as a series of components separated by a `.` character.
2424

2525
Along with `.` character, there are a few more that have special meaning, including `|`, `#`, `@`, `\`, `*`, `!`, and `?`.
2626

@@ -46,7 +46,7 @@ The following GJSON Paths evaluate to the accompanying values.
4646

4747
### Basic
4848

49-
In many cases you'll just want to retreive values by object name or array index.
49+
In many cases you'll just want to retrieve values by object name or array index.
5050

5151
```go
5252
name.last "Anderson"

gjson.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ func parseObject(c *parseContext, i int, path string) (int, bool) {
12521252
}
12531253

12541254
// matchLimit will limit the complexity of the match operation to avoid ReDos
1255-
// attacks from arbritary inputs.
1255+
// attacks from arbitrary inputs.
12561256
// See the github.com/tidwall/match.MatchLimit function for more information.
12571257
func matchLimit(str, pattern string) bool {
12581258
matched, _ := match.MatchLimit(str, pattern, 10000)
@@ -2194,7 +2194,7 @@ func unescape(json string) string {
21942194
}
21952195

21962196
// Less return true if a token is less than another token.
2197-
// The caseSensitive paramater is used when the tokens are Strings.
2197+
// The caseSensitive parameter is used when the tokens are Strings.
21982198
// The order when comparing two different type is:
21992199
//
22002200
// Null < False < Number < String < True < JSON
@@ -3353,7 +3353,7 @@ func (t Result) Path(json string) string {
33533353
goto fail
33543354
}
33553355
if !strings.HasPrefix(json[t.Index:], t.Raw) {
3356-
// Result is not at the JSON index as exepcted.
3356+
// Result is not at the JSON index as expected.
33573357
goto fail
33583358
}
33593359
for ; i >= 0; i-- {

0 commit comments

Comments
 (0)