enum_options.proto 536 B

1234567891011121314151617181920212223
  1. syntax="proto3";
  2. import "google/protobuf/descriptor.proto";
  3. /**
  4. Allows custom strings for Enum proto values when converting to/from json
  5. Example:
  6. Enum SomeEnum {
  7. DefaultEnumValue = 0 [json_enum_value="custom_name_for_default_value"];
  8. }
  9. message TProtoTest {
  10. SomeEnum someField = 0 [json_name="some_field"];
  11. }
  12. will correspond {"some_field": "custom_name_for_default_value"}
  13. when [Proto2JsonConfig|Json2ProtoConfig].UseJsonEnumValue = True
  14. */
  15. extend google.protobuf.EnumValueOptions {
  16. string json_enum_value = 4242279;
  17. }