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

Improve and document JSON output #270

Merged
merged 13 commits into from
Dec 21, 2021
Merged

Improve and document JSON output #270

merged 13 commits into from
Dec 21, 2021

Conversation

Kobzol
Copy link
Collaborator

@Kobzol Kobzol commented Dec 17, 2021

This PR changes the JSON output based on feedback from #241.

What has changed:

  1. JSON output should now always produce parseable JSON. Notably, it no longer outputs multiple lines with JSON, but always a single JSON value.
  2. Errors are now printed in a printer-specific way (in JSON they are outputted as a dictionary with an error key).
  3. Most JSON outputs were reworked and their output was manually specified. Dates and durations are now formatted correctly and enumerations are also formatted in a more reasonable way.
  4. Tests were rewritten. They now use structural matching of the output vs an expected schema (using the schema library). They still lack a lot of situations to test though.

Documentation is missing currently. I want to document some basic JSON schema of the output (however not everything will be stabilized right away).

Fixes: #241

@Kobzol Kobzol added this to the v0.8 milestone Dec 17, 2021
@Kobzol Kobzol marked this pull request as ready for review December 20, 2021 10:16
@Kobzol Kobzol requested a review from spirali December 20, 2021 10:16
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

Successfully merging this pull request may close these issues.

Parsable hq jobs output
2 participants