aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/proto/enum_options.proto
blob: 0349187b36c090c05ff34d05dbf08a993e2d1a67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
syntax="proto3";

import "google/protobuf/descriptor.proto";

/**
Allows custom strings for Enum proto values when converting to/from json

Example:

Enum SomeEnum {
    DefaultEnumValue = 0 [json_enum_value="custom_name_for_default_value"];
}
message TProtoTest {
    SomeEnum someField = 0 [json_name="some_field"];
}

will correspond {"some_field": "custom_name_for_default_value"}
when [Proto2JsonConfig|Json2ProtoConfig].UseJsonEnumValue = True

*/
extend google.protobuf.EnumValueOptions {
    string json_enum_value = 4242279;
}