Skip to content

CSHARP-5825: Support (de)serialization between BSON and EJSON#1939

Open
papafe wants to merge 2 commits intomongodb:mainfrom
papafe:csharp5825
Open

CSHARP-5825: Support (de)serialization between BSON and EJSON#1939
papafe wants to merge 2 commits intomongodb:mainfrom
papafe:csharp5825

Conversation

@papafe
Copy link
Copy Markdown
Contributor

@papafe papafe commented Apr 7, 2026

No description provided.

@papafe papafe requested review from Copilot and removed request for Copilot April 7, 2026 08:39
@papafe papafe requested a review from a team as a code owner April 7, 2026 08:39
@papafe papafe requested a review from adelinowona April 7, 2026 08:39
@papafe papafe added the feature Adds new user-facing functionality. label Apr 7, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new methods in this file break the alphabetical ordering.

Comment on lines +43 to 44
DeserializeEJsonExpression,
DateAddExpression,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: DateAddExpression should come before DeserializeEJsonExpression.

Comment on lines +31 to 32
private static readonly MethodInfo __deserializeEJson;
private static readonly MethodInfo __dateFromStringWithFormat;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

__dateFromStringWithFormat (and the other __dateFromString* variants) should all appear before __deserializeEJson .

Same issue in the public properties section (lines 113-117): DeserializeEJson is wedged between DateFromString and DateFromStringWithFormat*.

private bool? _relaxed;

/// <summary>
/// The relaxed parameter. When true, produces relaxed Extended JSON format. When false, produces canonical format. Defaults to true.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The sentence "Defaults to true" could be misread as "this C# property defaults to true." The property defaults to null (not set). The server defaults to true when the parameter is omitted. I would suggest clarifying: "The server defaults to true when this is not specified."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adds new user-facing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants