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

BSON-as-JSON indented output #985

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

vector-of-bool
Copy link
Collaborator

This changeset adds options to bson_as_json that supports prettier-formatted output. Helpful when debugging differences between large documents side-by-side. These options are only exposed in the private API at the moment. It works like:

  • level_indent - If NULL, all behaves as previously. If not-null, this string is inserted at the beginning of the line N times for a line at depth N.
  • initial_indent - This is inserted before the opening brace.
  • subsequent_indent - This is inserted before the level_indents at the beginning of every line (except for the first line).

(This was useful while debugging csfle oddities.)

@vector-of-bool vector-of-bool requested a review from kevinAlbs May 6, 2022 00:53
@kevinAlbs kevinAlbs removed their request for review December 1, 2023 18:17
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.

1 participant