I am creating a JSON file with Newtonsoft.Json from a set of classes. The file created is very large, so I have created JsonProperty\'s for the properties to re
If you are willing to use F# (or simply use an API not optimized for C#), the FSharp.JsonSkippable library contains a generic wrapper type that allows you to control in a simple and strongly typed manner whether to include a given property when serializing (and determine whether a property was included when deserializing), and moreover, to control/determine exclusion separately of nullability. (Full disclosure: I'm the author of the library.)