aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/json_writer_output.cpp
diff options
context:
space:
mode:
authormaxfed <maxfed@yandex-team.com>2022-12-22 13:10:49 +0300
committermaxfed <maxfed@yandex-team.com>2022-12-22 13:10:49 +0300
commit3412f691a8c5be823c995c4da884039769b5aeef (patch)
treedc30ad224de959038d9a04a7b588eff711d147c2 /library/cpp/protobuf/json/json_writer_output.cpp
parentdcc1ffc26fabcd374f52f45b980499d00fe5a00c (diff)
downloadydb-3412f691a8c5be823c995c4da884039769b5aeef.tar.gz
Add settings for converting float to string in TProto2JsonConfig
init
Diffstat (limited to 'library/cpp/protobuf/json/json_writer_output.cpp')
-rw-r--r--library/cpp/protobuf/json/json_writer_output.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/cpp/protobuf/json/json_writer_output.cpp b/library/cpp/protobuf/json/json_writer_output.cpp
index 288f645bab..a8e060c53c 100644
--- a/library/cpp/protobuf/json/json_writer_output.cpp
+++ b/library/cpp/protobuf/json/json_writer_output.cpp
@@ -8,6 +8,9 @@ namespace NProtobufJson {
jsonConfig.ValidateUtf8 = false;
jsonConfig.DontEscapeStrings = false;
jsonConfig.WriteNanAsString = config.WriteNanAsString;
+ jsonConfig.DoubleNDigits = config.DoubleNDigits;
+ jsonConfig.FloatNDigits = config.FloatNDigits;
+ jsonConfig.FloatToStringMode = config.FloatToStringMode;
for (size_t i = 0; i < config.StringTransforms.size(); ++i) {
Y_ASSERT(config.StringTransforms[i]);