toProto3Json method

Object toProto3Json(
  1. {TypeRegistry typeRegistry = const TypeRegistry.empty()}

Returns an Object representing Proto3 JSON serialization of this.

The key for each field is be the camel-cased name of the field.

Well-known types and their special JSON encoding are supported. If a well-known type cannot be encoded (eg. a google.protobuf.Timestamp with negative nanoseconds) an error is thrown.

Extensions and unknown fields are not encoded.

The typeRegistry is be used for encoding Any messages. If an Any message encoding a type not in typeRegistry is encountered, an error is thrown.


Object toProto3Json(
        {TypeRegistry typeRegistry = const TypeRegistry.empty()}) =>
    _writeToProto3Json(_fieldSet, typeRegistry);