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

DOCSP-45822 Add convention packs section #447

Merged

Conversation

jordan-smith721
Copy link
Collaborator

@jordan-smith721 jordan-smith721 commented Jan 28, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-45822

Staging Links

  • fundamentals/serialization
  • fundamentals/serialization/poco
  • whats-new
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?
    • Are all the links working?
    • Are the facets and meta keywords accurate?

    Copy link

    netlify bot commented Jan 28, 2025

    Deploy Preview for docs-csharp ready!

    Name Link
    🔨 Latest commit aa640e8
    🔍 Latest deploy log https://app.netlify.com/sites/docs-csharp/deploys/67a50d9a71e1630008c776b3
    😎 Deploy Preview https://deploy-preview-447--docs-csharp.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    * - `IgnoreExtraElementsConvention <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.Serialization.Conventions.IgnoreExtraElementsConvention.html>`__
    - Specifies whether to ignore extra elements in a document during deserialization.

    * - `ObjectSerializerAllowedTypesConvention <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.Serialization.Conventions.ObjectSerializerAllowedTypesConvention.html>`__
    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    This link will be broken until the API docs are released

    @rustagir rustagir self-requested a review January 28, 2025 20:18
    Copy link
    Collaborator

    @rustagir rustagir left a comment

    Choose a reason for hiding this comment

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

    mostly lgtm, left a few comments for clarity improvments

    source/fundamentals/serialization.txt Outdated Show resolved Hide resolved
    source/fundamentals/serialization.txt Outdated Show resolved Hide resolved
    source/fundamentals/serialization.txt Outdated Show resolved Hide resolved
    source/fundamentals/serialization.txt Outdated Show resolved Hide resolved
    @jordan-smith721 jordan-smith721 requested review from a team, BorisDog and rstam and removed request for a team and BorisDog January 29, 2025 15:46
    ----------------

    Convention packs allow you to define and apply
    **conventions** to your classes and their members during serialization.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    "during serialization"

    Technically conventions are applied before serialization while auto configuring class maps.

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    Updated the wording here. It was meant to convey that the conventions you specify are used/followed in the serialization process


    The {+driver-short+} provides built-in convention packs that you can use to
    customize the serialization process. The following table describes some of the
    built-in convention packs:
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    The following are conventions, not convention-packs.

    Convention-packs are sets of conventions that have been bundled to be used together.

    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    Thanks for the clarification. Updated the section to refer to conventions rather than convention packs in most instances


    The 3.2 driver release includes the following new features:

    - Adds a new ``ObjectSerializerAllowedTypesConvention`` convention pack that
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    ObjectSerializerAllowedTypesConvention is a convention, not a convention pack.

    @jordan-smith721 jordan-smith721 requested a review from rstam February 6, 2025 19:31
    Copy link
    Collaborator

    @rstam rstam left a comment

    Choose a reason for hiding this comment

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

    LGTM

    @jordan-smith721 jordan-smith721 merged commit 2ee7961 into mongodb:master Feb 7, 2025
    5 of 6 checks passed
    @jordan-smith721 jordan-smith721 deleted the DOCSP-45822-allowedTypes branch February 7, 2025 15:02
    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.

    3 participants