diff options
author | Brendan McCarthy <brendan@oddsoftware.net> | 2017-03-17 18:46:18 +1000 |
---|---|---|
committer | Brendan McCarthy <brendan@oddsoftware.net> | 2017-03-17 18:46:18 +1000 |
commit | 1eee3202fce4953a9c0c3adbf357ed10bd71e01e (patch) | |
tree | bc81f1fb68206f3951cfdccd4a2940cf93996808 /src/google/protobuf/util/json_util.h | |
parent | 44dc55587ebbf79912615c8bbcd0947e7ebaa33a (diff) |
Add use_snake_case_for_field_names option to JsonPrintOptions
Diffstat (limited to 'src/google/protobuf/util/json_util.h')
-rw-r--r-- | src/google/protobuf/util/json_util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/google/protobuf/util/json_util.h b/src/google/protobuf/util/json_util.h index 53b1d1ba..439d137f 100644 --- a/src/google/protobuf/util/json_util.h +++ b/src/google/protobuf/util/json_util.h @@ -64,10 +64,13 @@ struct JsonPrintOptions { // Whether to always print enums as ints. By default they are rendered as // strings. bool always_print_enums_as_ints; + // Whether to convert field names to snake case + bool use_snake_case_for_field_names; JsonPrintOptions() : add_whitespace(false), always_print_primitive_fields(false), - always_print_enums_as_ints(false) { + always_print_enums_as_ints(false), + use_snake_case_for_field_names(false) { } }; |