mapToJson<T1, T2> method

Map<String, dynamic> mapToJson<T1, T2>(
  1. Map<T1, T2> input, {
  2. Set<Type> typesAllowed = const {},
  3. String? keyConverter(
    1. dynamic
    )?,
})

Converts a map to a Json map by recursively converting its keys and values to Json compatible types.

Implementation

Map<String, dynamic> mapToJson<T1, T2>(
  Map<T1, T2> input, {
  Set<Type> typesAllowed = const {},
  String? Function(dynamic)? keyConverter,
}) {
  return _mapToJson(
    input,
    typesAllowed,
    keyConverter,
  ) as Map<String, dynamic>;
}