JsonSerializerOptions constructor

JsonSerializerOptions({
  1. List<GenericType> types = const [],
  2. List<JsonConverter> converters = const [],
  3. List<NamingConvention>? namingConventions,
  4. 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;