diff options
| author | nae202 <[email protected]> | 2025-09-23 07:48:35 +0300 |
|---|---|---|
| committer | nae202 <[email protected]> | 2025-09-23 08:03:21 +0300 |
| commit | 63774bc851bb76e24f369ef4e0328e5f05edbb4b (patch) | |
| tree | d3226ed9a5f200097949f6001a7e3183aff7adfa /library/cpp/json/json_reader.cpp | |
| parent | f4cbf746a0b6649479cfb305eceababced0ac10a (diff) | |
Style fix
commit_hash:d506e2a0f2770f3662449a3711e976499eb9ccbb
Diffstat (limited to 'library/cpp/json/json_reader.cpp')
| -rw-r--r-- | library/cpp/json/json_reader.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/json/json_reader.cpp b/library/cpp/json/json_reader.cpp index a1a9584481f..7a0803bde89 100644 --- a/library/cpp/json/json_reader.cpp +++ b/library/cpp/json/json_reader.cpp @@ -18,7 +18,7 @@ namespace NJson { << TStringBuf(", Code: ") << (int)result.Code() << TStringBuf(", Error: ") << GetParseError_En(result.Code()); } - } + } // namespace static const size_t DEFAULT_BUFFER_LEN = 65536; @@ -101,8 +101,9 @@ namespace NJson { bool TParserCallbacks::OnOpenArray() { bool res = OpenComplexValue(JSON_ARRAY); - if (res) + if (res) { CurrentState = IN_ARRAY; + } return res; } @@ -112,8 +113,9 @@ namespace NJson { bool TParserCallbacks::OnOpenMap() { bool res = OpenComplexValue(JSON_MAP); - if (res) + if (res) { CurrentState = IN_MAP; + } return res; } @@ -134,7 +136,7 @@ namespace NJson { } bool TParserCallbacks::OnEnd() { - if (NotClosedBracketIsError){ + if (NotClosedBracketIsError) { return ValuesStack.empty(); } return true; @@ -367,11 +369,10 @@ namespace NJson { return reader.Parse<ConvertToRapidJsonFlags(currentFlags)>(is, handler); } -#define TRY_EXTRACT_FLAG(flag) \ - if (runtimeFlags & flag) { \ +#define TRY_EXTRACT_FLAG(flag) \ + if (runtimeFlags & flag) { \ return ReadWithRuntimeFlags<TRapidJsonCompliantInputStream, THandler, currentFlags | flag>( \ - runtimeFlags ^ flag, reader, is, handler \ - ); \ + runtimeFlags ^ flag, reader, is, handler); \ } TRY_EXTRACT_FLAG(ReaderConfigFlags::NANINF); @@ -390,7 +391,6 @@ namespace NJson { rapidjson::Reader& reader, TRapidJsonCompliantInputStream& is, THandler& handler) { - // validate by default ui8 flags = ReaderConfigFlags::VALIDATE; @@ -437,7 +437,7 @@ namespace NJson { bool ReadJsonTree(TRapidJsonCompliantInputStream& is, const TJsonReaderConfig* config, TJsonValue* out, bool throwOnError) { out->SetType(NJson::JSON_NULL); - TJsonValueBuilder handler(*out, { .MaxDepth = config->MaxDepth }); + TJsonValueBuilder handler(*out, {.MaxDepth = config->MaxDepth}); return ReadJson(is, config, handler, throwOnError); } @@ -459,7 +459,7 @@ namespace NJson { bool ReadJsonTreeImpl(TData* in, TJsonValue* out, bool throwOnError) { return ReadJsonTreeImpl(in, false, out, throwOnError); } - } //namespace + } // namespace bool ReadJsonTree(TStringBuf in, TJsonValue* out, bool throwOnError) { return ReadJsonTreeImpl(&in, out, throwOnError); @@ -580,7 +580,7 @@ namespace NJson { return Impl.OnCloseArray(); } }; - } + } // namespace bool ReadJson(IInputStream* in, TJsonCallbacks* cbs) { return ReadJson(in, false, cbs); @@ -633,4 +633,4 @@ namespace NJson { return out; } -} +} // namespace NJson |
