[JsonProperty(Required = Required.Always)] attribute, but apparently this only restricts deserialization. Is there any way to restrict serialization as well? Looking to throw an exception or something if developer tries to serialize an object without a required property. I'm not attached to Newtonsoft if there is another library that has this functionality.