diff options
author | maxfed <maxfed@yandex-team.com> | 2022-12-22 13:10:49 +0300 |
---|---|---|
committer | maxfed <maxfed@yandex-team.com> | 2022-12-22 13:10:49 +0300 |
commit | 3412f691a8c5be823c995c4da884039769b5aeef (patch) | |
tree | dc30ad224de959038d9a04a7b588eff711d147c2 /library/cpp/protobuf/json/json_writer_output.cpp | |
parent | dcc1ffc26fabcd374f52f45b980499d00fe5a00c (diff) | |
download | ydb-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.cpp | 3 |
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]); |