Allow me to set JsonSerializerSettings
Today I have to use JsonProperty or JsonConverter attributes to decorate my objects one property at a time.
This is painful when dealing with large objects and error prone.
It would be a much better idea to support the use of JsonSerializerSettings to set global behavior for JSON.NET ... just like WebApi and ASP.NET does today.

26 comments
-
Mark Rexwinkel commented
This would be a great feature. I needed this so I made a little work around so I could use JsonSerializationSettings with the LINQ provider.
https://github.com/markrexwinkel/azure-docdb-linq-extension -
Thomas Mutzl commented
And please make sure, that the Linq provider also respects the JsonSerializerSettings!
-
Landon commented
This would be a great improvement to DocumentDB. Please give us more flexibility in the way we configure the json settings. As was pointed out before, one benefit of this flexibility would be we could turn on type name persistence.
-
Michael Carr commented
We need to persist a document that contains a property that is an interface that may potentially reference one of several different implementations of that interface. Using the default json settings, we lose that specific implementation type when we push it to DocumentDB because the type name isn't persisted. We can turn on type name persistence in JsonSerializerSettings but there's no way to pass those settings in to DocumentDB.
-
Kyle commented
This is also a problem when I need to serialize my POCOs elsewhere in my code that expect a different property name. For example, documentdb requires that my documents "Id" be changed to "id". My serialized json objects elsewhere in my codebase are already expecting "Id"
-
Anonymous commented
this is also important when there are serializations/deserializations against objects that are using interfaces as properties' types