aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/config.h
diff options
context:
space:
mode:
authordddlatyshev <dddlatyshev@yandex-team.com>2023-02-22 19:30:31 +0300
committerdddlatyshev <dddlatyshev@yandex-team.com>2023-02-22 19:30:31 +0300
commite335b244b0805b9744c35500685750135c97bd8f (patch)
treea9492ee15bafec49139dbd31234defc4da8ba4c7 /library/cpp/protobuf/json/config.h
parentd6db0fa7fd05eea98ca692ecc6bd29c2b08700c3 (diff)
downloadydb-e335b244b0805b9744c35500685750135c97bd8f.tar.gz
Add StringifyInt64Always mode
Diffstat (limited to 'library/cpp/protobuf/json/config.h')
-rw-r--r--library/cpp/protobuf/json/config.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/library/cpp/protobuf/json/config.h b/library/cpp/protobuf/json/config.h
index 2ffda4a065..96bb832565 100644
--- a/library/cpp/protobuf/json/config.h
+++ b/library/cpp/protobuf/json/config.h
@@ -83,12 +83,13 @@ namespace NProtobufJson {
bool MapAsObject = false;
/// Stringify long integers which are not exactly representable by float or double values
- enum EStringifyLongNumbersMode {
+ enum EStringifyNumbersMode {
StringifyLongNumbersNever = 0, // default
StringifyLongNumbersForFloat,
StringifyLongNumbersForDouble,
+ StringifyInt64Always,
};
- EStringifyLongNumbersMode StringifyLongNumbers = StringifyLongNumbersNever;
+ EStringifyNumbersMode StringifyNumbers = StringifyLongNumbersNever;
/// Custom field names generator.
TNameGenerator NameGenerator = {};
@@ -170,8 +171,8 @@ namespace NProtobufJson {
return *this;
}
- TSelf& SetStringifyLongNumbers(EStringifyLongNumbersMode stringify) {
- StringifyLongNumbers = stringify;
+ TSelf& SetStringifyNumbers(EStringifyNumbersMode stringify) {
+ StringifyNumbers = stringify;
return *this;
}