Skip to content

Fix JSON strcmp against BSON array following mongo-c-driver f2c1bb79 #1322

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

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Jan 22, 2025

Followup to mongodb/mongo-c-driver#1816.

This appears to be the only breaking change introduced by mongodb/mongo-c-driver@f2c1bb7 as observed by the C++ Driver test suite, verified by this patch.

It may be worthwhile to remember to include a note in the upcoming C Driver release notes that the whitespace formatting of JSON output may have slightly changed. Then again, I do not expect users to be equality-comparing the contents of JSON strings, let alone JSON strings of empty arrays, so this could be considered an unnecessary gesture.

@eramongodb eramongodb requested review from kevinAlbs and a user January 22, 2025 19:55
@eramongodb eramongodb self-assigned this Jan 22, 2025
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks. There were at least two other very minor changes to JSON output: the new serializer added recursion bounds to codewscope which was previously missing them, and instead of using "{ ... }" to indicate both omitted arrays and documents it now has "[ ... ]" to signify an array omitted due to hitting the recursion limit.

@eramongodb eramongodb merged commit dc7839a into mongodb:master Jan 22, 2025
12 of 16 checks passed
@eramongodb eramongodb deleted the cxx-json branch January 22, 2025 21:10
ghost pushed a commit to mongodb/mongo-c-driver that referenced this pull request Jan 23, 2025
This is a follow-up to #1816 and mongodb/mongo-cxx-driver#1322, documenting minor changes to JSON output subsequent to change f2c1bb7
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.

2 participants