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

Support for json output in cli commands #42

Closed
pelikhan opened this issue Dec 25, 2014 · 9 comments
Closed

Support for json output in cli commands #42

pelikhan opened this issue Dec 25, 2014 · 9 comments
Assignees
Milestone

Comments

@pelikhan
Copy link

An option to dump data as JSON in the console output would be handhandy for commands like list and such. It avoids having to write parsers around the output of clients when automatingoing it.

@pelikhan
Copy link
Author

Auto completion really messed up the title:

Support for json output in cli commands

@ivankravets ivankravets changed the title support us on output in click commands Support for json output in cli commands Dec 25, 2014
@ivankravets ivankravets added this to the 1.0.0 milestone Dec 25, 2014
@ivankravets
Copy link
Member

Thanks! I got you. I will add it later via new "settings"'s option.

@ivankravets
Copy link
Member

What do you think, which way is better to tell PlatformIO for json output?

  1. Additional option to specific command, like $ platformio list --output=json
  2. Global settings $ platformio settings set output_json yes

I'm not sure that I can implement normal json output for each command, but I can try.

@ivankravets ivankravets removed this from the 1.0.0 milestone Dec 29, 2014
@pelikhan
Copy link
Author

pelikhan commented Jan 2, 2015

Imo, (1) would be bwst. Just --json.

On Sunday, December 28, 2014, Ivan Kravets notifications@github.com wrote:

What do you think, which way is better to tell PlatformIO for json output?

  1. Additional option to specific command, like $ platformio list
    --output=json
  2. Global settings$ platformio settings set output_json yes`

I'm not sure that I can implement normal json output for each command,
but I can try.


Reply to this email directly or view it on GitHub
#42 (comment)
.

This posting is provided "AS IS" with no warranties, and confers no rights.

@ivankravets
Copy link
Member

Imo, (1) would be bwst. Just --json.

Give me please a list with the commands which should return JSON response.

Thanks.

@pelikhan
Copy link
Author

pelikhan commented Jan 2, 2015

All the list commands, platforms, serial ports, libraries, etc...

On Friday, January 2, 2015, Ivan Kravets notifications@github.com wrote:

Imo, (1) would be bwst. Just --json.

Give me please a list with the commands which should return JSON response.

Thanks.


Reply to this email directly or view it on GitHub
#42 (comment)
.

This posting is provided "AS IS" with no warranties, and confers no rights.

@pelikhan
Copy link
Author

pelikhan commented Jan 5, 2015

The JSON produced is invalid. You can use online tools like JsonLint to validate it.

@ivankravets
Copy link
Member

Opss... I see it. I will release new 0.10.2 tomorrow with that hotfix.

@ivankravets ivankravets reopened this Jan 5, 2015
@ivankravets ivankravets added this to the 0.10.2 milestone Jan 5, 2015
@ivankravets ivankravets self-assigned this Jan 5, 2015
ivankravets added a commit that referenced this issue Jan 6, 2015
@pelikhan
Copy link
Author

pelikhan commented Jan 9, 2015

What also adding for the boards option?

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

No branches or pull requests

2 participants