mongo-c-driver
mongo-c-driver copied to clipboard
BSON-as-JSON indented output
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
- IfNULL
, 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 thelevel_indent
s at the beginning of every line (except for the first line).
(This was useful while debugging csfle oddities.)