encodeBallFileJson function
Encodes a Program or Module as a proto3-JSON ball file: the message's
own proto3 JSON with the Any @type key prepended.
Implementation
Map<String, dynamic> encodeBallFileJson(GeneratedMessage message) {
final type = _typeUrlFor(message);
final body = message.toProto3Json() as Map<String, dynamic>;
return <String, dynamic>{'@type': type, ...body};
}