Skip to content

Commit

Permalink
Merge branch 'master' into fun-types
Browse files Browse the repository at this point in the history
  • Loading branch information
f3ath authored Dec 29, 2023
2 parents 0762857 + 995f1b7 commit de1d2c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ and can be used to alter the referenced value. If you only need to manipulate JS
check out my [JSON Pointer implementation].

## User-defined functions
The JSONPath parser may be extended by user-defined functions. The user-defined functions
The JSONPath parser may be extended with user-defined functions. The user-defined functions
take precedence over the built-in ones specified by the standard. Currently, only
functions of 1 and 2 arguments are supported.

To create your own function:
1. Import `package:json_path/fun_sdk.dart`.
2. Create a class implementing either `Fun1` (1 argument) or `Fun2` (2 argument).
2. Create a class implementing either `Fun1` (1 argument) or `Fun2` (2 arguments).

To use it:
1. Create a new JsonPathParser with your function: `final parser = JsonPathParser(functions: [MyFunction()]);`
Expand Down

0 comments on commit de1d2c0

Please sign in to comment.