You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
feat: allow enum strings in json serialization and deserialization (#107)
* feat: allow enum strings in json serialization and deserialization
For protobuf messages that contain enum fields, it is now possible to
specify that enum variants should be serialized as names and not as integers.
E.g.
json_str = MyMessage.to_json(my_message, enum_strings=True)
Similarly, serialization from json that uses this convention is now supported.
This is useful for interoperation with other data sources that do use
strings to define enum variants in json serialization; and for
debugging, where visually inspecting data structures can be helpful,
and variant names are more informative than numerical values.
Note: includes reformatting of many source files due to an update to Black
0 commit comments