aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json/json_reader.h
diff options
context:
space:
mode:
authorRuslan Kovalev <ruslan.a.kovalev@gmail.com>2022-02-10 16:46:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:44 +0300
commit59e19371de37995fcb36beb16cd6ec030af960bc (patch)
treefa68e36093ebff8b805462e9e6d331fe9d348214 /library/cpp/json/json_reader.h
parent89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff)
downloadydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json/json_reader.h')
-rw-r--r--library/cpp/json/json_reader.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/json/json_reader.h b/library/cpp/json/json_reader.h
index b673788330..18bfe05982 100644
--- a/library/cpp/json/json_reader.h
+++ b/library/cpp/json/json_reader.h
@@ -1,15 +1,15 @@
#pragma once
-#include "json_value.h"
-
+#include "json_value.h"
+
#include <library/cpp/json/common/defs.h>
#include <library/cpp/json/fast_sax/parser.h>
-#include <util/generic/yexception.h>
-
+#include <util/generic/yexception.h>
+
#include <util/stream/input.h>
-#include <util/stream/str.h>
-#include <util/stream/mem.h>
+#include <util/stream/str.h>
+#include <util/stream/mem.h>
namespace NJson {
struct TJsonReaderConfig {
@@ -22,7 +22,7 @@ namespace NJson {
void SetBufferSize(size_t bufferSize);
size_t GetBufferSize() const;
-
+
private:
size_t BufferSize;
};
@@ -34,7 +34,7 @@ namespace NJson {
bool ReadJsonTree(IInputStream* in, TJsonValue* out, bool throwOnError = false);
bool ReadJsonTree(IInputStream* in, bool allowComments, TJsonValue* out, bool throwOnError = false);
bool ReadJsonTree(IInputStream* in, const TJsonReaderConfig* config, TJsonValue* out, bool throwOnError = false);
-
+
TJsonValue ReadJsonTree(IInputStream* in, bool throwOnError = false);
TJsonValue ReadJsonTree(IInputStream* in, bool allowComments, bool throwOnError);
TJsonValue ReadJsonTree(IInputStream* in, const TJsonReaderConfig* config, bool throwOnError = false);
@@ -73,11 +73,11 @@ namespace NJson {
inline bool ValidateJsonThrow(IInputStream* in, const TJsonReaderConfig* config) {
return ValidateJson(in, config, true);
}
-
+
inline bool ValidateJsonThrow(TStringBuf in, const TJsonReaderConfig& config = TJsonReaderConfig()) {
return ValidateJson(in, config, true);
}
-
+
class TParserCallbacks: public TJsonCallbacks {
public:
TParserCallbacks(TJsonValue& value, bool throwOnError = false, bool notClosedBracketIsError = false);
@@ -93,13 +93,13 @@ namespace NJson {
bool OnCloseMap() override;
bool OnMapKey(const TStringBuf& val) override;
bool OnEnd() override;
-
+
protected:
TJsonValue& Value;
TString Key;
TVector<TJsonValue*> ValuesStack;
bool NotClosedBracketIsError;
-
+
enum {
START,
AFTER_MAP_KEY,
@@ -137,4 +137,4 @@ namespace NJson {
//// relaxed json, used in library/cpp/scheme
bool ReadJsonFastTree(TStringBuf in, TJsonValue* out, bool throwOnError = false, bool notClosedBracketIsError = false);
TJsonValue ReadJsonFastTree(TStringBuf in, bool notClosedBracketIsError = false);
-}
+}