[CSHARP-4564] Write a custom serializer for ValueTuples Created: 09/Mar/23  Updated: 28/Oct/23  Resolved: 15/Mar/23

Status: Closed
Project: C# Driver
Component/s: Serialization
Affects Version/s: None
Fix Version/s: 2.19.1

Type: New Feature Priority: Unknown
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CSHARP-4549 Support Tuple.Create and ValueTuple.C... Closed
Related
related to CSHARP-4542 LINQ3 support for projecting to a Val... Closed
Documentation Changes: Not Needed
Documentation Changes Summary:

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?


 Description   

ValueTuple is currently serialized using a BsonClassMapSerializer.

We should write a custom ValueTupleSerializer that works the same way as the existing TupleSerializer. In particular, it should serialize ValueTuples as arrays.



 Comments   
Comment by Githook User [ 24/Mar/23 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-4564: Implement ValueSerializers.
Branch: v2.19.x
https://github.com/mongodb/mongo-csharp-driver/commit/51b97517765377f3fbbead6aae928fc1d3a1fbdd

Comment by Githook User [ 15/Mar/23 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-4564: Implement ValueSerializers.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/f64a6d77f2b6093653d4becab458ba6486955823

Generated at Wed Feb 07 21:48:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.