diff --git a/docs/json.1.html b/docs/json.1.html index 3f2a267..56fd6f2 100644 --- a/docs/json.1.html +++ b/docs/json.1.html @@ -538,6 +538,16 @@

FEATURE: In-place editing

"hostname": "127.0.0.1", "port": 8080 } + +# add/update field that contains periods +$ json -I -f config.json -e 'this["field.with.periods"]="update"' +json: updated "config.json" in-place +$ cat config.json +{ + "hostname": "127.0.0.1", + "port": 8080, + "field.with.periods": "update" +}

Some limitations. Only one file at a time:

diff --git a/docs/json.1.ronn b/docs/json.1.ronn index 08ec8e4..78cec1e 100644 --- a/docs/json.1.ronn +++ b/docs/json.1.ronn @@ -425,6 +425,16 @@ You can edit a file in place with `-I` and `-f FILE`: "port": 8080 } + # add/update field that contains periods + $ json -I -f config.json -e 'this["field.with.periods"]="update"' + json: updated "config.json" in-place + $ cat config.json + { + "hostname": "127.0.0.1", + "port": 8080, + "field.with.periods": "update" + } + Some limitations. Only one file at a time: $ json -I -f foo.json -f bar.json