-
Notifications
You must be signed in to change notification settings - Fork 30
Feat: Add empty json output mode #844
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
base: main
Are you sure you want to change the base?
Changes from all commits
e8a6005
bf110d8
423e130
ea9bb26
8b40684
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,6 +251,10 @@ impl Output for JsonOutput { | |
fn print_error(&self, error: Error) { | ||
self.print(json!({ "error": format!("{error:?}") })) | ||
} | ||
|
||
fn finalize_output(&self) { | ||
self.print(json!({})); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should only be printed if we did not print anything in the JSON printer. Otherwise we will print multiple JSON objects, which is invalid JSON. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohh thanks I will work on this now. |
||
} | ||
} | ||
|
||
fn format_task_description(task_desc: &TaskDescription) -> Value { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to print anything here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks will fix this.