Skip to content

Commit 7def7ec

Browse files
committed
Update to version 0.4.0
1 parent ee6efaf commit 7def7ec

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Options:
2222
Commands:
2323
merge <file> <files> merge two or more json files into one
2424
set <file> <key> <value> set a value in a json file
25-
remove <file> <key> Remove a value from the json
25+
remove, rm <file> <key> Remove a value from the json
26+
get <file> <key> Read a value from a JSON file.
2627
```
2728

2829
### Commands
@@ -87,3 +88,23 @@ Options:
8788
-o, --output <file> The output file (use '-' for STDOUT, defaults to <file>)
8889
-?, -h, --help Show help and usage information
8990
```
91+
92+
#### get
93+
94+
Reads the json file and returns the value for the given key.
95+
96+
```
97+
get:
98+
Read a value from a JSON file.
99+
100+
Usage:
101+
dotnet-json get [options] <file> <key>
102+
103+
Arguments:
104+
<file> The JSON file (use '-' for STDIN)
105+
<key> The key to get (use ':' to get a nested object and use index numbers to get array values eg. nested:key or nested:1:key)
106+
107+
Options:
108+
-e, --exact only return exact value matches, this will return an error for references to nested objects/arrays.
109+
-?, -h, --help Show help and usage information
110+
```

dotnet-json/dotnet-json.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ToolCommandName>dotnet-json</ToolCommandName>
1414
<PackageOutputPath>./nupkg</PackageOutputPath>
1515

16-
<Version>0.3.0</Version>
16+
<Version>0.4.0</Version>
1717
<PackageId>dotnet-json</PackageId>
1818
<Authors>sleeuwen</Authors>
1919
<RepositoryUrl>https://github.com/sleeuwen/dotnet-json</RepositoryUrl>

0 commit comments

Comments
 (0)