From 87d2a4068da75380d2a0dfe6ca7936b36b60c553 Mon Sep 17 00:00:00 2001 From: J Wyman Date: Tue, 14 Apr 2026 15:28:44 -0400 Subject: [PATCH 1/3] add kParseIterativeFlag when parsing JSON inputs --- include/triton/common/triton_json.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/triton/common/triton_json.h b/include/triton/common/triton_json.h index 2b439e9..1ce11d0 100644 --- a/include/triton/common/triton_json.h +++ b/include/triton/common/triton_json.h @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -177,7 +178,7 @@ class TritonJsonImpl { TRITONJSON_STATUSRETURN( std::string("JSON parsing only available for top-level document")); } - const unsigned int parseFlags = rapidjson::kParseNanAndInfFlag; + const unsigned int parseFlags = rapidjson::kParseNanAndInfFlag | rapidjson::kParseIterativeFlag; document_.Parse(base, size); if (document_.HasParseError()) { TRITONJSON_STATUSRETURN(std::string( From 66471da960832fb0dd0bfb31c05025233ae131ca Mon Sep 17 00:00:00 2001 From: J Wyman Date: Tue, 14 Apr 2026 17:34:29 -0400 Subject: [PATCH 2/3] Update include/triton/common/triton_json.h Update the copyright. Co-authored-by: Yingge He <157551214+yinggeh@users.noreply.github.com> --- include/triton/common/triton_json.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/triton/common/triton_json.h b/include/triton/common/triton_json.h index 1ce11d0..3faf8d5 100644 --- a/include/triton/common/triton_json.h +++ b/include/triton/common/triton_json.h @@ -1,4 +1,4 @@ -// Copyright 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// Copyright 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions From c57861e61bce9c3fa450e87548ef83211f4c7bc1 Mon Sep 17 00:00:00 2001 From: J Wyman Date: Tue, 14 Apr 2026 18:05:18 -0400 Subject: [PATCH 3/3] make pre-commit happy --- include/triton/common/triton_json.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/triton/common/triton_json.h b/include/triton/common/triton_json.h index 3faf8d5..73900a5 100644 --- a/include/triton/common/triton_json.h +++ b/include/triton/common/triton_json.h @@ -178,7 +178,8 @@ class TritonJsonImpl { TRITONJSON_STATUSRETURN( std::string("JSON parsing only available for top-level document")); } - const unsigned int parseFlags = rapidjson::kParseNanAndInfFlag | rapidjson::kParseIterativeFlag; + const unsigned int parseFlags = + rapidjson::kParseNanAndInfFlag | rapidjson::kParseIterativeFlag; document_.Parse(base, size); if (document_.HasParseError()) { TRITONJSON_STATUSRETURN(std::string(