You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now there are some commands like arduino-cli core list --format json that return an array of objects.
When a cli command is requested with the --format json, we want to enforce the output to start with a JSON object.
This also helps when we need to add some warning information in the JSON output, and it would simply add a warnings key in the object avoiding inconsistent behavior or some fatal edge cases.
We should also double-check if there are some commands that should return some json object but it currently doesn't return anything.
Expectation:
The result key can have also a different name. Something to be decided during the implementation.
arduino-cli core list --format json
{
"result":[{...},...,{...}]
}
Describe the current behavior
Currently some commands like arduino-cli core list --format json print an array of objects
alessio-perugini
changed the title
Ensure that cliJ SON output always return a JsonObject
Ensure that cli JSON output always return a JsonObject
Nov 7, 2023
Describe the request
Right now there are some commands like
arduino-cli core list --format json
that return an array of objects.When a cli command is requested with the --format json, we want to enforce the output to start with a JSON object.
This also helps when we need to add some warning information in the JSON output, and it would simply add a
warnings
key in the object avoiding inconsistent behavior or some fatal edge cases.We should also double-check if there are some commands that should return some json object but it currently doesn't return anything.
Expectation:
The
result
key can have also a different name. Something to be decided during the implementation.arduino-cli core list --format json { "result":[{...},...,{...}] }
Describe the current behavior
Currently some commands like
arduino-cli core list --format json
print an array of objectsArduino CLI version
Operating system
Linux
Operating system version
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: