JsonSerializerOptions constructor
JsonSerializerOptions({
- List<
GenericType> types = const [], - List<
JsonConverter> converters = const [], - List<
NamingConvention> ? namingConventions, - NamingConvention? jsonNamingConvention,
Creates a new instance of JsonSerializerOptions.
@param types The list of user-defined types. Defaults to an empty list.
@param converters The list of custom converters. Defaults to an empty list.
@param namingConventions The list of naming conventions to support.
If not provided, defaults to defaultNamingConventions.
@param jsonNamingConvention The specific naming convention to use for JSON.
If null, will be auto-detected.
Implementation
JsonSerializerOptions({
this.types = const [],
this.converters = const [],
List<NamingConvention>? namingConventions,
this.jsonNamingConvention,
}) : namingConventions = namingConventions ?? defaultNamingConventions;