veilidchat/lib/proto/extensions.dart
2024-06-06 07:49:42 -04:00

13 lines
450 B
Dart

import 'proto.dart' as proto;
proto.Message messageFromJson(Map<String, dynamic> j) =>
proto.Message.create()..mergeFromJsonMap(j);
Map<String, dynamic> messageToJson(proto.Message m) => m.writeToJsonMap();
proto.ReconciledMessage reconciledMessageFromJson(Map<String, dynamic> j) =>
proto.ReconciledMessage.create()..mergeFromJsonMap(j);
Map<String, dynamic> reconciledMessageToJson(proto.ReconciledMessage m) =>
m.writeToJsonMap();