Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3985

Extend serialization to support non-global configuration

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.14.0
    • Component/s: Serialization
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      We currently rely on static/global serialization components, which makes it difficult to customize serialization behavior in a flexible and context-specific way.

      This ticket proposes introducing a new serialization approach that allows passing down configuration and options, without removing the existing global/static components. The goal is to support both models in parallel, enabling more flexible and testable code while maintaining backward compatibility.

      Moving away from global serialization components will allow, among the rest:

      • Greater flexibility in deciding configuration based on context, for example when connecting to different MongoDB deployments
      • Improved testing possibilities, possibly allowing parallel testing as well

      Components affected by this work include:

      • BsonSerializer
      • BsonClassMap
      • ConventionRegistry

            Assignee:
            ferdinando.papale@mongodb.com Ferdinando Papale
            Reporter:
            mirko@etherna.io Mirko Da Corte
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: