protoJson<M extends GeneratedMessage> static method

BiDi<Map<String, dynamic>, M> protoJson<M extends GeneratedMessage>(
  1. M create()
)

Implementation

static BiDi<Map<String, dynamic>, M> protoJson<M extends GeneratedMessage>(
    M Function() create,
    ) =>
    BiDi(
      forward: (map) => create()
        ..mergeFromProto3Json(map, ignoreUnknownFields: true)
        ..freeze(),
      backward: (message) => message.toProto3Json() as Map<String, dynamic>,
    );