toJsonMap method

Map<String, dynamic> toJsonMap({
  1. Set<ToJsonObjectConverter<Object?>> converters = const {},
})

Recursively converts map to a new map of type Map<String, dynamic>.

converters may be used to convert some specific objects to json representable objects. The first converter in the set that has a match with the type of the current value, as per ToJsonObjectConverter.isType will be used to convert the current value. There should only be one converter for each object type.

Implementation

Map<String, dynamic> toJsonMap({
  Set<ToJsonObjectConverter<Object?>> converters = const {},
}) {
  return yamlMapToJsonMap(this, converters: converters);
}