[CSHARP-2025] Add capability of pass metadata to serializers on Serialize/Deserialize methods Created: 28/Jul/17 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | Serialization |
| Affects Version/s: | 2.4 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Mirko Da Corte | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
I'd like to be able to write smart serializers, where I can share information whit the invoked sub-serializers. Currently, for example on deserialization process, there are the "context" and "args" arguments, but I can't add arbitrary data as metadata about current model and document. An invoked serializer could have need to access, for example, to a document version metadata stored on the root of the document. The simpliest way to share this information, is to pass it with the call. |
| Comments |
| Comment by Mirko Da Corte [ 29/Jul/17 ] |
|
I could also solve inheriting from the reader/writer, and extending the class with the desired properties... |