aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json/easy_parse/json_easy_parser.h
diff options
context:
space:
mode:
authorfinder <finder@yandex-team.ru>2022-02-10 16:49:24 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:24 +0300
commitabbbaf4075fbaa0ff4ce9faa1188089466a21dbe (patch)
tree4beaffe75727862ab08110c7ce520dc7aa49ff30 /library/cpp/json/easy_parse/json_easy_parser.h
parent46f4bc6ab513a0ed1407f9095284a00e20f05adc (diff)
downloadydb-abbbaf4075fbaa0ff4ce9faa1188089466a21dbe.tar.gz
Restoring authorship annotation for <finder@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json/easy_parse/json_easy_parser.h')
-rw-r--r--library/cpp/json/easy_parse/json_easy_parser.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/json/easy_parse/json_easy_parser.h b/library/cpp/json/easy_parse/json_easy_parser.h
index 59d7791ab14..64c483aabaf 100644
--- a/library/cpp/json/easy_parse/json_easy_parser.h
+++ b/library/cpp/json/easy_parse/json_easy_parser.h
@@ -1,12 +1,12 @@
-#pragma once
+#pragma once
#include <util/generic/string.h>
-#include <util/generic/vector.h>
-#include <util/stream/input.h>
-#include <util/stream/output.h>
-#include "json_easy_parser_impl.h"
-
-namespace NJson {
+#include <util/generic/vector.h>
+#include <util/stream/input.h>
+#include <util/stream/output.h>
+#include "json_easy_parser_impl.h"
+
+namespace NJson {
/* This class filters out nodes from a source JSON by a xpath-style description. It represent these nodes as a tab-delimited string (or a vector).
* It is useful if you need to parse a data which comes into JSON in a known and fixed format.
* Fields are set as a list of keys separated by slash, for example:
@@ -21,26 +21,26 @@ namespace NJson {
* NB! Library can not extract values of not a simple type (namely it doesn't support the case when a result is a vocabulary or an array) from JSON.
* If you expect such a case, please check json_value.h.
*/
-
- class TJsonParser {
+
+ class TJsonParser {
TString Prefix;
-
- struct TField {
+
+ struct TField {
TVector<TPathElem> Path;
- bool NonEmpty;
- };
+ bool NonEmpty;
+ };
TVector<TField> Fields;
-
- friend class TRewriteJsonImpl;
-
+
+ friend class TRewriteJsonImpl;
+
void ConvertToTabDelimited(IInputStream& in, IOutputStream& out) const;
- public:
+ public:
void SetPrefix(const TString& prefix) {
- Prefix = prefix;
- }
+ Prefix = prefix;
+ }
void AddField(const TString& path, bool mustExist);
TString ConvertToTabDelimited(const TString& json) const;
bool Parse(const TString& json, TVector<TString>* res) const;
- };
-}
+ };
+}