I have been writing a system using MongoDB Protocol to Azure CosmosDB (DocumentDB) and have coded for changes to the model to occur and prevent blowing up. We are considering switching to the CosmosDB protocol, but have been unable to find a way to do this. Does anyone know if this is possible and what is the correct method to do it? With MongoDB it is a property like:
[BsonExtraElements]
public IDictionary<string, object> ExtraElements { get; set; }
We are only concerned with property removal and renaming/retyping (i.e. from string Code {get; set;}
to SomeAwesomeObject Code {get; set;}
Thanks to @wasabi i was able to determine that JsonExtensionDataAttribute is what is needed for this work. This is explained well at http://www.jerriepelser.com/blog/using-jsonextensiondata-with-jsonnet/