FirelyTeam / firely-net-sdk

The official Firely .NET SDK for HL7 FHIR
Other
829 stars 345 forks source link

Adapt parsers to use overflow and new ClassMapping features #2889

Open ewoutkramer opened 1 month ago

ewoutkramer commented 1 month ago

The parsers must be able to store unknown properties in the overflow dictionary, or update the POCO through IDictionary. In any case, there should be less logic about the structure of the poco (e.g. for Primitives use ObjectValue, otherwise use a setter), by calling the Set and Get methods on the PRopertyMapping, just like System.Text.Json. By delegating this knowledge to the mapping, we can support more flexible situations, just like system.text.json is very configurable. E.g. configure the mapping to read/write to and from an extension instead of a property. Which would be a nice way to support cross-version extensions.