diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/json/fast_sax/parser.rl6 | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json/fast_sax/parser.rl6')
-rw-r--r-- | library/cpp/json/fast_sax/parser.rl6 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/json/fast_sax/parser.rl6 b/library/cpp/json/fast_sax/parser.rl6 index edb4e9ee1b..0f1ad3b3b1 100644 --- a/library/cpp/json/fast_sax/parser.rl6 +++ b/library/cpp/json/fast_sax/parser.rl6 @@ -2,7 +2,7 @@ #include <library/cpp/json/fast_sax/parser.h> #include <util/string/cast.h> -#include <util/generic/buffer.h> +#include <util/generic/buffer.h> #include <util/generic/strbuf.h> #include <util/generic/ymath.h> @@ -15,7 +15,7 @@ enum EStoredStr { struct TParserCtx { TJsonCallbacks& Hndl; - TBuffer Buffer; + TBuffer Buffer; TStringBuf String; EStoredStr Stored = SS_NONE; bool ExpectValue = true; @@ -142,9 +142,9 @@ struct TParserCtx { } bool OnStrE() { - Buffer.Clear(); - Buffer.Reserve(2 * (te - ts)); - + Buffer.Clear(); + Buffer.Reserve(2 * (te - ts)); + return OnString(UnescapeJsonUnicode(TStringBuf(ts + 1, te - ts - 2), Buffer.data()), SS_MUSTCOPY); } @@ -170,8 +170,8 @@ struct TParserCtx { Stored = SS_NONE; switch (stored) { - default: - return false; + default: + return false; case SS_NOCOPY: return Hndl.OnMapKeyNoCopy(String); case SS_MUSTCOPY: |