aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json
diff options
context:
space:
mode:
authora-square <a-square@yandex-team.ru>2022-02-10 16:50:24 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:24 +0300
commit34f3f9bd7972f67d913075206081554a3e39a0de (patch)
tree89df462bfae95c8d9063871a9eae476233768b09 /library/cpp/json
parente7879def805c52076a0b162a0270dfb229379d4e (diff)
downloadydb-34f3f9bd7972f67d913075206081554a3e39a0de.tar.gz
Restoring authorship annotation for <a-square@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json')
-rw-r--r--library/cpp/json/json_writer.h32
-rw-r--r--library/cpp/json/ut/json_writer_ut.cpp4
2 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/json/json_writer.h b/library/cpp/json/json_writer.h
index c7f5c9499a..006bfe5325 100644
--- a/library/cpp/json/json_writer.h
+++ b/library/cpp/json/json_writer.h
@@ -156,22 +156,22 @@ namespace NJson {
// nothing to do
}
- void WriteKey(const TStringBuf key) {
- Buf.WriteKey(key);
- }
-
- void WriteKey(const unsigned char* key) {
- WriteKey((const char*)key);
- }
-
- void WriteKey(const char* key) {
- WriteKey(TStringBuf{key});
- }
-
- void WriteKey(const TString& key) {
- WriteKey(TStringBuf{key});
- }
-
+ void WriteKey(const TStringBuf key) {
+ Buf.WriteKey(key);
+ }
+
+ void WriteKey(const unsigned char* key) {
+ WriteKey((const char*)key);
+ }
+
+ void WriteKey(const char* key) {
+ WriteKey(TStringBuf{key});
+ }
+
+ void WriteKey(const TString& key) {
+ WriteKey(TStringBuf{key});
+ }
+
void WriteKey(const std::string& key) {
WriteKey(TStringBuf{key});
}
diff --git a/library/cpp/json/ut/json_writer_ut.cpp b/library/cpp/json/ut/json_writer_ut.cpp
index ca11d34dad..e43d9d2caa 100644
--- a/library/cpp/json/ut/json_writer_ut.cpp
+++ b/library/cpp/json/ut/json_writer_ut.cpp
@@ -16,8 +16,8 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
TJsonWriter json(&out, false);
json.OpenMap();
json.Write("key1", (ui16)1);
- json.WriteKey("key2");
- json.Write((i32)2);
+ json.WriteKey("key2");
+ json.Write((i32)2);
json.Write("key3", (ui64)3);
UNIT_ASSERT(out.Empty());