aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/json_value_output.h
diff options
context:
space:
mode:
authorVasily Gerasimov <UgnineSirdis@gmail.com>2022-02-10 16:49:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:09 +0300
commit6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (patch)
treef69637041e6fed76ebae0c74ae1fa0c4be6ab5b4 /library/cpp/protobuf/json/json_value_output.h
parente5d4696304c6689379ac7ce334512404d4b7836c (diff)
downloadydb-6cdc8f140213c595e4ad38bc3d97fcef1146b8c3.tar.gz
Restoring authorship annotation for Vasily Gerasimov <UgnineSirdis@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/json_value_output.h')
-rw-r--r--library/cpp/protobuf/json/json_value_output.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/protobuf/json/json_value_output.h b/library/cpp/protobuf/json/json_value_output.h
index 3fc6ff2ab0..8d71d36af4 100644
--- a/library/cpp/protobuf/json/json_value_output.h
+++ b/library/cpp/protobuf/json/json_value_output.h
@@ -1,12 +1,12 @@
-#pragma once
-
+#pragma once
+
#include "json_output.h"
#include <library/cpp/json/writer/json_value.h>
-
+
#include <util/generic/stack.h>
-namespace NProtobufJson {
+namespace NProtobufJson {
class TJsonValueOutput: public IJsonOutput {
public:
TJsonValueOutput(NJson::TJsonValue& value)
@@ -14,7 +14,7 @@ namespace NProtobufJson {
{
Context.emplace(TContext::JSON_AFTER_KEY, Root);
}
-
+
void DoWrite(const TStringBuf& s) override;
void DoWrite(const TString& s) override;
void DoWrite(int i) override;
@@ -25,27 +25,27 @@ namespace NProtobufJson {
void DoWrite(double f) override;
void DoWrite(bool b) override;
void DoWriteNull() override;
-
+
void DoBeginList() override;
void DoEndList() override;
-
+
void DoBeginObject() override;
void DoWriteKey(const TStringBuf& key) override;
void DoEndObject() override;
-
+
void DoWriteRawJson(const TStringBuf& str) override;
-
+
private:
template <typename T>
void WriteImpl(const T& t);
-
+
struct TContext {
enum EType {
JSON_MAP,
JSON_ARRAY,
JSON_AFTER_KEY,
};
-
+
TContext(EType type, NJson::TJsonValue& value)
: Type(type)
, Value(value)
@@ -55,9 +55,9 @@ namespace NProtobufJson {
EType Type;
NJson::TJsonValue& Value;
};
-
+
NJson::TJsonValue& Root;
TStack<TContext, TVector<TContext>> Context;
};
-
+
}