Class JsonFormatterAttribute
Mark a WebApi to use the modern Json Formatter based on System.Text.Json. Without this, older WebApi Controllers use the Newtonsoft JSON Formatter. Also provides additional configuration to make certain work easier.
[PublicApi]
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
public class JsonFormatterAttribute : Attribute, _Attribute
- Inheritance
-
objectAttributeJsonFormatterAttribute
- Implements
Remarks
- new in v15.08
Properties
Casing
Specify how resulting objects should be cased. Default is Camel. Will affect both normal object properties as well as Dictionary keys.
public Casing Casing { get; set; }
Property Value
EntityFormat
public EntityFormat EntityFormat { get; set; }