You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-26Lines changed: 38 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,13 @@ Usage
12
12
13
13
First, you need Java 8 or later.
14
14
15
-
If you use Maven, add the following snippet to the `<dependencies>` section of your POM. For instructions for other build tools (Gradle, etc.), visit [jackson-jq](https://search.maven.org/artifact/net.thisptr/jackson-jq/1.0.0-preview.20210926/jar) on search.maven.org.
15
+
If you use Maven, add the following snippet to the `<dependencies>` section of your POM. For instructions for other build tools (Gradle, etc.), visit [jackson-jq](https://search.maven.org/artifact/net.thisptr/jackson-jq/1.0.0-preview.20210928/jar) on search.maven.org.
16
16
17
17
```xml
18
18
<dependency>
19
19
<groupId>net.thisptr</groupId>
20
20
<artifactId>jackson-jq</artifactId>
21
-
<version>1.0.0-preview.20210926</version>
21
+
<version>1.0.0-preview.20210928</version>
22
22
</dependency>
23
23
```
24
24
@@ -32,29 +32,29 @@ To test a query quickly, we provide jackson-jq CLI.
32
32
*Please note that jackson-jq is a Java library and the CLI is provided solely for debugging/testing purpose (and not for production). The command-line options might change without notice.*
| •[`import RelativePathString as NAME [<metadata>];`](https://stedolan.github.io/jq/manual/v1.5/#importRelativePathStringasNAME[<metadata>];)| × |
`jackson-jq-extra` module provides extra functions that you might find useful. These functions do not exist in jq.
494
+
The `jackson-jq/extras` module is a jq module that provides some useful functions that do not exist in jq.
495
+
496
+
To use this module, you need to add the following Maven dependency and set `BuiltinModuleLoader` (see [jackson-jq/src/test/java/examples/Usage.java](jackson-jq/src/test/java/examples/Usage.java)) to the scope.
495
497
496
498
```xml
497
499
<dependency>
498
500
<groupId>net.thisptr</groupId>
499
501
<artifactId>jackson-jq-extra</artifactId>
500
-
<version>1.0.0-preview.20210926</version>
502
+
<version>1.0.0-preview.20210928</version>
501
503
</dependency>
502
504
```
503
505
506
+
Now, you can import the module in jq:
507
+
508
+
```jq
509
+
import "jackson-jq/extras" as extras;
510
+
511
+
extras::uuid4
512
+
```
513
+
514
+
For a historical reason, adding the Maven dependency also makes the functions directly available to jq. This behavior is deprecated and will be removed at some point in the future.
0 commit comments