Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json does not change values #117

Open
gabsoftware opened this issue Jul 6, 2017 · 4 comments
Open

json does not change values #117

gabsoftware opened this issue Jul 6, 2017 · 4 comments

Comments

@gabsoftware
Copy link

gabsoftware commented Jul 6, 2017

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

@tsal
Copy link

tsal commented Aug 16, 2017

Having the same issue here.

@tsal
Copy link

tsal commented Aug 16, 2017

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.

@gregorskii
Copy link

+1 quoting

@gabsoftware
Copy link
Author

@tsal Yep, your solution worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants