google / google/protobuf.dart

toProto3Json incompatible with dart:convert

Open
#307 0 comments 2 reactions 0 assignees View on GitHub
feature request
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

According to jsonEncode from dart:convert:
`If toEncodable is omitted, it defaults to a function that returns the result of calling .toJson() on the unencodable object.`

In order to serialize an object tree, all nested objects should have the method .toJson(). In order to support serialization of objects that contain protobuf messages, toProto3Json could be renamed to toJson.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.