json icon indicating copy to clipboard operation
json copied to clipboard

json does not change values

Open gabsoftware opened this issue 7 years ago • 4 comments

Hello,

I'm trying to update some properties in a valid JSON file. For example: json -f app.json -I -e 'this.version="1.0.0.1"'

It does not update the value.

If I omit the -I option, the outputed json is not updated.

json version 9.0.6, node version 6.2.0 File I am trying to change in attachment.

app.json.txt

gabsoftware avatar Jul 06 '17 08:07 gabsoftware

Having the same issue here.

tsal avatar Aug 16 '17 17:08 tsal

Scratch that - looks like it's a quoting issue. @gabsoftware try this:

json -f app.json -I -e "this.version=\"1.0.0.1\""

Not sure why single quotes aren't working.

tsal avatar Aug 16 '17 17:08 tsal

+1 quoting

gregorskii avatar Aug 25 '17 22:08 gregorskii

@tsal Yep, your solution worked!

gabsoftware avatar Aug 28 '17 07:08 gabsoftware