Skip to content

Commit 50db726

Browse files
committed
- [#] update to v0.6.0
1 parent e4dfd31 commit 50db726

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ The `jsonfiddle` makes it easy to look at the JSON data from different aspects.
2929

3030
```
3131
$ jsonfiddle -V
32-
jsonfiddle - JSON Fiddling, version 0.5.0
33-
Built on 2023-01-22
34-
Copyright (C) 2017-2023, Tong Sun
32+
jsonfiddle - JSON Fiddling, version 0.6.0
33+
Built on 2025-11-18
34+
Copyright (C) 2017-2025, Tong Sun
3535
3636
Tool to fiddle with json strings
3737
```
@@ -93,20 +93,24 @@ the required flag `-i, --input' was not specified
9393
Usage:
9494
jsonfiddle [OPTIONS] fmt [fmt-OPTIONS]
9595
96+
97+
9698
Application Options:
97-
-c, --compact Compact JSON data, remove all whitespaces
98-
--prefix= prefix for json string output
99-
-d, --indent= indent for json string output (default: )
100-
-p, --protect protect {{TEMPLATE}} in JSON data
101-
-v, --verbose Verbose mode (Multiple -v options increase the verbosity)
102-
-V, --version Show program version and exit
99+
-c, --compact Compact JSON data, remove all whitespaces
100+
--prefix= prefix for json string output
101+
-d, --indent= indent for json string output (default: )
102+
-p, --protect protect {{TEMPLATE}} in JSON data
103+
-v, --verbose Verbose mode (Multiple -v options increase the verbosity)
104+
-V, --version Show program version and exit
103105
104106
Help Options:
105-
-h, --help Show this help message
107+
-h, --help Show this help message
106108
107109
[fmt command options]
108-
-i, --input= the source to get json string from (mandatory)
109-
-o, --output= the output, default to stdout (default: -)
110+
-i, --input= the source to get json string from (mandatory)
111+
-o, --output= the output, default to stdout (default: -)
112+
-s, --concise Compact the top level array into concise array style
113+
-u, --unescape Unescape unicode of form < to their literal characters
110114
```
111115

112116
### $ jsonfiddle sort || true
@@ -338,10 +342,10 @@ and the result is the same (and for all other examples using `-i` as well).
338342
339343
```
340344
$ jsonfiddle x2j -i test/Books.xml | jsonfiddle sort -i - | jsonfiddle fmt -i -
345+
Format json string
341346
XML to JSON
342-
jsonfiddle v0.5.0. x2j - XML to JSON
347+
jsonfiddle v0.6.0. x2j - XML to JSON
343348
Sort json fields recursively
344-
Format json string
345349
{
346350
"catalog": {
347351
"book": [

jsonfiddle_main.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package main
77
////////////////////////////////////////////////////////////////////////////
88
// Program: jsonfiddle
99
// Purpose: JSON Fiddling
10-
// Authors: Tong Sun (c) 2017-2023, All rights reserved
10+
// Authors: Tong Sun (c) 2017-2025, All rights reserved
1111
////////////////////////////////////////////////////////////////////////////
1212

1313
//go:generate sh jsonfiddle_cliGen.sh
@@ -16,7 +16,6 @@ package main
1616
import (
1717
"fmt"
1818
"io"
19-
"io/ioutil"
2019
"os"
2120
"regexp"
2221

@@ -32,8 +31,8 @@ import (
3231

3332
var (
3433
progname = "jsonfiddle"
35-
version = "0.5.0"
36-
date = "2023-01-22"
34+
version = "0.6.0"
35+
date = "2025-11-18"
3736

3837
// Opts store all the configurable options
3938
Opts OptsT
@@ -67,14 +66,14 @@ func main() {
6766
func showVersion() {
6867
fmt.Fprintf(os.Stderr, "jsonfiddle - JSON Fiddling, version %s\n", version)
6968
fmt.Fprintf(os.Stderr, "Built on %s\n", date)
70-
fmt.Fprintf(os.Stderr, "Copyright (C) 2017-2023, Tong Sun\n\n")
69+
fmt.Fprintf(os.Stderr, "Copyright (C) 2017-2025, Tong Sun\n\n")
7170
fmt.Fprintf(os.Stderr, "Tool to fiddle with json strings\n")
7271
os.Exit(0)
7372
}
7473

7574
// readJson reads the given json file as []byte.
7675
func readJson(r io.Reader) []byte {
77-
data, err := ioutil.ReadAll(r)
76+
data, err := io.ReadAll(r)
7877
clis.AbortOn("Reading json input", err)
7978

8079
if Opts.Protect {

0 commit comments

Comments
 (0)