IMap<K, V>.fromJson constructor

IMap<K, V>.fromJson(
  1. Map<String, Object?> json,
  2. K fromJsonK(
    1. Object?
    ),
  3. V fromJsonV(
    1. Object?
    )
)

Converts from JSon. Json serialization support for json_serializable with @JsonSerializable.

Implementation

factory IMap.fromJson(
  Map<String, Object?> json,
  K Function(Object?) fromJsonK,
  V Function(Object?) fromJsonV,
) =>
    json.map<K, V>((key, value) => MapEntry(fromJsonK(key), fromJsonV(value))).lock;