toJson method

Object toJson(
  1. Object? toJsonK(
    1. K
    ),
  2. Object? toJsonV(
    1. V
    )
)

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

Implementation

Object toJson(Object? Function(K) toJsonK, Object? Function(V) toJsonV) =>
    unlock.map((key, value) => MapEntry(toJsonK(key), toJsonV(value)));