diff --git a/CMakeLists.txt b/CMakeLists.txt
index 28349e6af1f..a17376541df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2380,10 +2380,6 @@ add_library(grpc
src/core/lib/iomgr/wakeup_fd_nospecial.cc
src/core/lib/iomgr/wakeup_fd_pipe.cc
src/core/lib/iomgr/wakeup_fd_posix.cc
- src/core/lib/json/json_object_loader.cc
- src/core/lib/json/json_reader.cc
- src/core/lib/json/json_util.cc
- src/core/lib/json/json_writer.cc
src/core/lib/matchers/matchers.cc
src/core/lib/promise/activity.cc
src/core/lib/promise/party.cc
@@ -2600,6 +2596,10 @@ add_library(grpc
src/core/util/http_client/httpcli.cc
src/core/util/http_client/httpcli_security_connector.cc
src/core/util/http_client/parser.cc
+ src/core/util/json/json_object_loader.cc
+ src/core/util/json/json_reader.cc
+ src/core/util/json/json_util.cc
+ src/core/util/json/json_writer.cc
src/core/xds/grpc/certificate_provider_store.cc
src/core/xds/grpc/file_watcher_certificate_provider_factory.cc
src/core/xds/grpc/xds_audit_logger_registry.cc
@@ -3171,9 +3171,6 @@ add_library(grpc_unsecure
src/core/lib/iomgr/wakeup_fd_nospecial.cc
src/core/lib/iomgr/wakeup_fd_pipe.cc
src/core/lib/iomgr/wakeup_fd_posix.cc
- src/core/lib/json/json_object_loader.cc
- src/core/lib/json/json_reader.cc
- src/core/lib/json/json_writer.cc
src/core/lib/promise/activity.cc
src/core/lib/promise/party.cc
src/core/lib/promise/sleep.cc
@@ -3317,6 +3314,9 @@ add_library(grpc_unsecure
src/core/util/http_client/format_request.cc
src/core/util/http_client/httpcli.cc
src/core/util/http_client/parser.cc
+ src/core/util/json/json_object_loader.cc
+ src/core/util/json/json_reader.cc
+ src/core/util/json/json_writer.cc
third_party/upb/upb/mini_descriptor/build_enum.c
third_party/upb/upb/mini_descriptor/decode.c
third_party/upb/upb/mini_descriptor/internal/base92.c
@@ -5288,8 +5288,6 @@ add_library(grpc_authorization_provider
src/core/lib/iomgr/wakeup_fd_nospecial.cc
src/core/lib/iomgr/wakeup_fd_pipe.cc
src/core/lib/iomgr/wakeup_fd_posix.cc
- src/core/lib/json/json_reader.cc
- src/core/lib/json/json_writer.cc
src/core/lib/matchers/matchers.cc
src/core/lib/promise/activity.cc
src/core/lib/promise/party.cc
@@ -5387,6 +5385,8 @@ add_library(grpc_authorization_provider
src/core/tsi/alts/handshaker/transport_security_common_api.cc
src/core/tsi/transport_security.cc
src/core/tsi/transport_security_grpc.cc
+ src/core/util/json/json_reader.cc
+ src/core/util/json/json_writer.cc
third_party/upb/upb/mini_descriptor/build_enum.c
third_party/upb/upb/mini_descriptor/decode.c
third_party/upb/upb/mini_descriptor/internal/base92.c
@@ -17917,7 +17917,6 @@ add_executable(interception_chain_test
src/core/lib/iomgr/wakeup_fd_nospecial.cc
src/core/lib/iomgr/wakeup_fd_pipe.cc
src/core/lib/iomgr/wakeup_fd_posix.cc
- src/core/lib/json/json_writer.cc
src/core/lib/promise/activity.cc
src/core/lib/promise/party.cc
src/core/lib/promise/trace.cc
@@ -17989,6 +17988,7 @@ add_executable(interception_chain_test
src/core/telemetry/stats.cc
src/core/telemetry/stats_data.cc
src/core/tsi/alts/handshaker/transport_security_common_api.cc
+ src/core/util/json/json_writer.cc
test/core/transport/interception_chain_test.cc
third_party/upb/upb/mini_descriptor/build_enum.c
third_party/upb/upb/mini_descriptor/decode.c
diff --git a/Makefile b/Makefile
index 3c8bc751d3a..d7cb6d25659 100644
--- a/Makefile
+++ b/Makefile
@@ -1239,10 +1239,6 @@ LIBGRPC_SRC = \
src/core/lib/iomgr/wakeup_fd_nospecial.cc \
src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_posix.cc \
- src/core/lib/json/json_object_loader.cc \
- src/core/lib/json/json_reader.cc \
- src/core/lib/json/json_util.cc \
- src/core/lib/json/json_writer.cc \
src/core/lib/matchers/matchers.cc \
src/core/lib/promise/activity.cc \
src/core/lib/promise/party.cc \
@@ -1463,6 +1459,10 @@ LIBGRPC_SRC = \
src/core/util/http_client/httpcli_security_connector.cc \
src/core/util/http_client/parser.cc \
src/core/util/iphone/cpu.cc \
+ src/core/util/json/json_object_loader.cc \
+ src/core/util/json/json_reader.cc \
+ src/core/util/json/json_util.cc \
+ src/core/util/json/json_writer.cc \
src/core/util/linux/cpu.cc \
src/core/util/linux/log.cc \
src/core/util/log.cc \
diff --git a/Package.swift b/Package.swift
index 890fb11f726..6f315ad9c90 100644
--- a/Package.swift
+++ b/Package.swift
@@ -1459,17 +1459,6 @@ let package = Package(
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.cc",
"src/core/lib/iomgr/wakeup_fd_posix.h",
- "src/core/lib/json/json.h",
- "src/core/lib/json/json_args.h",
- "src/core/lib/json/json_channel_args.h",
- "src/core/lib/json/json_object_loader.cc",
- "src/core/lib/json/json_object_loader.h",
- "src/core/lib/json/json_reader.cc",
- "src/core/lib/json/json_reader.h",
- "src/core/lib/json/json_util.cc",
- "src/core/lib/json/json_util.h",
- "src/core/lib/json/json_writer.cc",
- "src/core/lib/json/json_writer.h",
"src/core/lib/matchers/matchers.cc",
"src/core/lib/matchers/matchers.h",
"src/core/lib/promise/activity.cc",
@@ -1929,6 +1918,17 @@ let package = Package(
"src/core/util/http_client/parser.cc",
"src/core/util/http_client/parser.h",
"src/core/util/iphone/cpu.cc",
+ "src/core/util/json/json.h",
+ "src/core/util/json/json_args.h",
+ "src/core/util/json/json_channel_args.h",
+ "src/core/util/json/json_object_loader.cc",
+ "src/core/util/json/json_object_loader.h",
+ "src/core/util/json/json_reader.cc",
+ "src/core/util/json/json_reader.h",
+ "src/core/util/json/json_util.cc",
+ "src/core/util/json/json_util.h",
+ "src/core/util/json/json_writer.cc",
+ "src/core/util/json/json_writer.h",
"src/core/util/linux/cpu.cc",
"src/core/util/linux/log.cc",
"src/core/util/log.cc",
diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml
index 78264ec8ede..a02eef838e8 100644
--- a/build_autogenerated.yaml
+++ b/build_autogenerated.yaml
@@ -972,13 +972,6 @@ libs:
- src/core/lib/iomgr/vsock.h
- src/core/lib/iomgr/wakeup_fd_pipe.h
- src/core/lib/iomgr/wakeup_fd_posix.h
- - src/core/lib/json/json.h
- - src/core/lib/json/json_args.h
- - src/core/lib/json/json_channel_args.h
- - src/core/lib/json/json_object_loader.h
- - src/core/lib/json/json_reader.h
- - src/core/lib/json/json_util.h
- - src/core/lib/json/json_writer.h
- src/core/lib/matchers/matchers.h
- src/core/lib/promise/activity.h
- src/core/lib/promise/all_ok.h
@@ -1213,6 +1206,13 @@ libs:
- src/core/util/http_client/httpcli.h
- src/core/util/http_client/httpcli_ssl_credentials.h
- src/core/util/http_client/parser.h
+ - src/core/util/json/json.h
+ - src/core/util/json/json_args.h
+ - src/core/util/json/json_channel_args.h
+ - src/core/util/json/json_object_loader.h
+ - src/core/util/json/json_reader.h
+ - src/core/util/json/json_util.h
+ - src/core/util/json/json_writer.h
- src/core/util/spinlock.h
- src/core/xds/grpc/certificate_provider_store.h
- src/core/xds/grpc/file_watcher_certificate_provider_factory.h
@@ -1801,10 +1801,6 @@ libs:
- src/core/lib/iomgr/wakeup_fd_nospecial.cc
- src/core/lib/iomgr/wakeup_fd_pipe.cc
- src/core/lib/iomgr/wakeup_fd_posix.cc
- - src/core/lib/json/json_object_loader.cc
- - src/core/lib/json/json_reader.cc
- - src/core/lib/json/json_util.cc
- - src/core/lib/json/json_writer.cc
- src/core/lib/matchers/matchers.cc
- src/core/lib/promise/activity.cc
- src/core/lib/promise/party.cc
@@ -2021,6 +2017,10 @@ libs:
- src/core/util/http_client/httpcli.cc
- src/core/util/http_client/httpcli_security_connector.cc
- src/core/util/http_client/parser.cc
+ - src/core/util/json/json_object_loader.cc
+ - src/core/util/json/json_reader.cc
+ - src/core/util/json/json_util.cc
+ - src/core/util/json/json_writer.cc
- src/core/xds/grpc/certificate_provider_store.cc
- src/core/xds/grpc/file_watcher_certificate_provider_factory.cc
- src/core/xds/grpc/xds_audit_logger_registry.cc
@@ -2508,12 +2508,6 @@ libs:
- src/core/lib/iomgr/vsock.h
- src/core/lib/iomgr/wakeup_fd_pipe.h
- src/core/lib/iomgr/wakeup_fd_posix.h
- - src/core/lib/json/json.h
- - src/core/lib/json/json_args.h
- - src/core/lib/json/json_channel_args.h
- - src/core/lib/json/json_object_loader.h
- - src/core/lib/json/json_reader.h
- - src/core/lib/json/json_writer.h
- src/core/lib/promise/activity.h
- src/core/lib/promise/all_ok.h
- src/core/lib/promise/arena_promise.h
@@ -2683,6 +2677,12 @@ libs:
- src/core/util/http_client/format_request.h
- src/core/util/http_client/httpcli.h
- src/core/util/http_client/parser.h
+ - src/core/util/json/json.h
+ - src/core/util/json/json_args.h
+ - src/core/util/json/json_channel_args.h
+ - src/core/util/json/json_object_loader.h
+ - src/core/util/json/json_reader.h
+ - src/core/util/json/json_writer.h
- src/core/util/spinlock.h
- third_party/upb/upb/generated_code_support.h
- third_party/upb/upb/mini_descriptor/build_enum.h
@@ -2952,9 +2952,6 @@ libs:
- src/core/lib/iomgr/wakeup_fd_nospecial.cc
- src/core/lib/iomgr/wakeup_fd_pipe.cc
- src/core/lib/iomgr/wakeup_fd_posix.cc
- - src/core/lib/json/json_object_loader.cc
- - src/core/lib/json/json_reader.cc
- - src/core/lib/json/json_writer.cc
- src/core/lib/promise/activity.cc
- src/core/lib/promise/party.cc
- src/core/lib/promise/sleep.cc
@@ -3098,6 +3095,9 @@ libs:
- src/core/util/http_client/format_request.cc
- src/core/util/http_client/httpcli.cc
- src/core/util/http_client/parser.cc
+ - src/core/util/json/json_object_loader.cc
+ - src/core/util/json/json_reader.cc
+ - src/core/util/json/json_writer.cc
- third_party/upb/upb/mini_descriptor/build_enum.c
- third_party/upb/upb/mini_descriptor/decode.c
- third_party/upb/upb/mini_descriptor/internal/base92.c
@@ -4596,10 +4596,6 @@ libs:
- src/core/lib/iomgr/vsock.h
- src/core/lib/iomgr/wakeup_fd_pipe.h
- src/core/lib/iomgr/wakeup_fd_posix.h
- - src/core/lib/json/json.h
- - src/core/lib/json/json_args.h
- - src/core/lib/json/json_reader.h
- - src/core/lib/json/json_writer.h
- src/core/lib/matchers/matchers.h
- src/core/lib/promise/activity.h
- src/core/lib/promise/all_ok.h
@@ -4730,6 +4726,10 @@ libs:
- src/core/tsi/transport_security.h
- src/core/tsi/transport_security_grpc.h
- src/core/tsi/transport_security_interface.h
+ - src/core/util/json/json.h
+ - src/core/util/json/json_args.h
+ - src/core/util/json/json_reader.h
+ - src/core/util/json/json_writer.h
- src/core/util/spinlock.h
- third_party/upb/upb/generated_code_support.h
- third_party/upb/upb/mini_descriptor/build_enum.h
@@ -4918,8 +4918,6 @@ libs:
- src/core/lib/iomgr/wakeup_fd_nospecial.cc
- src/core/lib/iomgr/wakeup_fd_pipe.cc
- src/core/lib/iomgr/wakeup_fd_posix.cc
- - src/core/lib/json/json_reader.cc
- - src/core/lib/json/json_writer.cc
- src/core/lib/matchers/matchers.cc
- src/core/lib/promise/activity.cc
- src/core/lib/promise/party.cc
@@ -5017,6 +5015,8 @@ libs:
- src/core/tsi/alts/handshaker/transport_security_common_api.cc
- src/core/tsi/transport_security.cc
- src/core/tsi/transport_security_grpc.cc
+ - src/core/util/json/json_reader.cc
+ - src/core/util/json/json_writer.cc
- third_party/upb/upb/mini_descriptor/build_enum.c
- third_party/upb/upb/mini_descriptor/decode.c
- third_party/upb/upb/mini_descriptor/internal/base92.c
@@ -11755,9 +11755,6 @@ targets:
- src/core/lib/iomgr/vsock.h
- src/core/lib/iomgr/wakeup_fd_pipe.h
- src/core/lib/iomgr/wakeup_fd_posix.h
- - src/core/lib/json/json.h
- - src/core/lib/json/json_args.h
- - src/core/lib/json/json_writer.h
- src/core/lib/promise/activity.h
- src/core/lib/promise/all_ok.h
- src/core/lib/promise/arena_promise.h
@@ -11862,6 +11859,9 @@ targets:
- src/core/telemetry/stats_data.h
- src/core/telemetry/tcp_tracer.h
- src/core/tsi/alts/handshaker/transport_security_common_api.h
+ - src/core/util/json/json.h
+ - src/core/util/json/json_args.h
+ - src/core/util/json/json_writer.h
- src/core/util/spinlock.h
- test/core/promise/poll_matcher.h
- third_party/upb/upb/generated_code_support.h
@@ -12046,7 +12046,6 @@ targets:
- src/core/lib/iomgr/wakeup_fd_nospecial.cc
- src/core/lib/iomgr/wakeup_fd_pipe.cc
- src/core/lib/iomgr/wakeup_fd_posix.cc
- - src/core/lib/json/json_writer.cc
- src/core/lib/promise/activity.cc
- src/core/lib/promise/party.cc
- src/core/lib/promise/trace.cc
@@ -12118,6 +12117,7 @@ targets:
- src/core/telemetry/stats.cc
- src/core/telemetry/stats_data.cc
- src/core/tsi/alts/handshaker/transport_security_common_api.cc
+ - src/core/util/json/json_writer.cc
- test/core/transport/interception_chain_test.cc
- third_party/upb/upb/mini_descriptor/build_enum.c
- third_party/upb/upb/mini_descriptor/decode.c
diff --git a/config.m4 b/config.m4
index 8ac529d95c2..6bc7cf554a7 100644
--- a/config.m4
+++ b/config.m4
@@ -614,10 +614,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/wakeup_fd_nospecial.cc \
src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_posix.cc \
- src/core/lib/json/json_object_loader.cc \
- src/core/lib/json/json_reader.cc \
- src/core/lib/json/json_util.cc \
- src/core/lib/json/json_writer.cc \
src/core/lib/matchers/matchers.cc \
src/core/lib/promise/activity.cc \
src/core/lib/promise/party.cc \
@@ -838,6 +834,10 @@ if test "$PHP_GRPC" != "no"; then
src/core/util/http_client/httpcli_security_connector.cc \
src/core/util/http_client/parser.cc \
src/core/util/iphone/cpu.cc \
+ src/core/util/json/json_object_loader.cc \
+ src/core/util/json/json_reader.cc \
+ src/core/util/json/json_util.cc \
+ src/core/util/json/json_writer.cc \
src/core/util/linux/cpu.cc \
src/core/util/linux/log.cc \
src/core/util/log.cc \
@@ -1532,7 +1532,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/windows)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr/event_engine_shims)
- PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/json)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/matchers)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/promise)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/resource_quota)
@@ -1603,6 +1602,7 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/android)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/http_client)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/iphone)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/json)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/linux)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/msys)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/posix)
diff --git a/config.w32 b/config.w32
index 64019fab52c..cd656636b48 100644
--- a/config.w32
+++ b/config.w32
@@ -579,10 +579,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\iomgr\\wakeup_fd_nospecial.cc " +
"src\\core\\lib\\iomgr\\wakeup_fd_pipe.cc " +
"src\\core\\lib\\iomgr\\wakeup_fd_posix.cc " +
- "src\\core\\lib\\json\\json_object_loader.cc " +
- "src\\core\\lib\\json\\json_reader.cc " +
- "src\\core\\lib\\json\\json_util.cc " +
- "src\\core\\lib\\json\\json_writer.cc " +
"src\\core\\lib\\matchers\\matchers.cc " +
"src\\core\\lib\\promise\\activity.cc " +
"src\\core\\lib\\promise\\party.cc " +
@@ -803,6 +799,10 @@ if (PHP_GRPC != "no") {
"src\\core\\util\\http_client\\httpcli_security_connector.cc " +
"src\\core\\util\\http_client\\parser.cc " +
"src\\core\\util\\iphone\\cpu.cc " +
+ "src\\core\\util\\json\\json_object_loader.cc " +
+ "src\\core\\util\\json\\json_reader.cc " +
+ "src\\core\\util\\json\\json_util.cc " +
+ "src\\core\\util\\json\\json_writer.cc " +
"src\\core\\util\\linux\\cpu.cc " +
"src\\core\\util\\linux\\log.cc " +
"src\\core\\util\\log.cc " +
@@ -1669,7 +1669,6 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\windows");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr\\event_engine_shims");
- FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\json");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\matchers");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\promise");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\resource_quota");
@@ -1743,6 +1742,7 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\android");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\http_client");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\iphone");
+ FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\json");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\linux");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\msys");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\posix");
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index 5adb9baebc0..5865f399235 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -1070,13 +1070,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/vsock.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
- 'src/core/lib/json/json.h',
- 'src/core/lib/json/json_args.h',
- 'src/core/lib/json/json_channel_args.h',
- 'src/core/lib/json/json_object_loader.h',
- 'src/core/lib/json/json_reader.h',
- 'src/core/lib/json/json_util.h',
- 'src/core/lib/json/json_writer.h',
'src/core/lib/matchers/matchers.h',
'src/core/lib/promise/activity.h',
'src/core/lib/promise/all_ok.h',
@@ -1312,6 +1305,13 @@ Pod::Spec.new do |s|
'src/core/util/http_client/httpcli.h',
'src/core/util/http_client/httpcli_ssl_credentials.h',
'src/core/util/http_client/parser.h',
+ 'src/core/util/json/json.h',
+ 'src/core/util/json/json_args.h',
+ 'src/core/util/json/json_channel_args.h',
+ 'src/core/util/json/json_object_loader.h',
+ 'src/core/util/json/json_reader.h',
+ 'src/core/util/json/json_util.h',
+ 'src/core/util/json/json_writer.h',
'src/core/util/spinlock.h',
'src/core/util/string.h',
'src/core/util/time_precise.h',
@@ -2341,13 +2341,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/vsock.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
- 'src/core/lib/json/json.h',
- 'src/core/lib/json/json_args.h',
- 'src/core/lib/json/json_channel_args.h',
- 'src/core/lib/json/json_object_loader.h',
- 'src/core/lib/json/json_reader.h',
- 'src/core/lib/json/json_util.h',
- 'src/core/lib/json/json_writer.h',
'src/core/lib/matchers/matchers.h',
'src/core/lib/promise/activity.h',
'src/core/lib/promise/all_ok.h',
@@ -2583,6 +2576,13 @@ Pod::Spec.new do |s|
'src/core/util/http_client/httpcli.h',
'src/core/util/http_client/httpcli_ssl_credentials.h',
'src/core/util/http_client/parser.h',
+ 'src/core/util/json/json.h',
+ 'src/core/util/json/json_args.h',
+ 'src/core/util/json/json_channel_args.h',
+ 'src/core/util/json/json_object_loader.h',
+ 'src/core/util/json/json_reader.h',
+ 'src/core/util/json/json_util.h',
+ 'src/core/util/json/json_writer.h',
'src/core/util/spinlock.h',
'src/core/util/string.h',
'src/core/util/time_precise.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 79466086520..1910f96bafc 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -1578,17 +1578,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.cc',
'src/core/lib/iomgr/wakeup_fd_posix.h',
- 'src/core/lib/json/json.h',
- 'src/core/lib/json/json_args.h',
- 'src/core/lib/json/json_channel_args.h',
- 'src/core/lib/json/json_object_loader.cc',
- 'src/core/lib/json/json_object_loader.h',
- 'src/core/lib/json/json_reader.cc',
- 'src/core/lib/json/json_reader.h',
- 'src/core/lib/json/json_util.cc',
- 'src/core/lib/json/json_util.h',
- 'src/core/lib/json/json_writer.cc',
- 'src/core/lib/json/json_writer.h',
'src/core/lib/matchers/matchers.cc',
'src/core/lib/matchers/matchers.h',
'src/core/lib/promise/activity.cc',
@@ -2044,6 +2033,17 @@ Pod::Spec.new do |s|
'src/core/util/http_client/parser.cc',
'src/core/util/http_client/parser.h',
'src/core/util/iphone/cpu.cc',
+ 'src/core/util/json/json.h',
+ 'src/core/util/json/json_args.h',
+ 'src/core/util/json/json_channel_args.h',
+ 'src/core/util/json/json_object_loader.cc',
+ 'src/core/util/json/json_object_loader.h',
+ 'src/core/util/json/json_reader.cc',
+ 'src/core/util/json/json_reader.h',
+ 'src/core/util/json/json_util.cc',
+ 'src/core/util/json/json_util.h',
+ 'src/core/util/json/json_writer.cc',
+ 'src/core/util/json/json_writer.h',
'src/core/util/linux/cpu.cc',
'src/core/util/linux/log.cc',
'src/core/util/log.cc',
@@ -3121,13 +3121,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/vsock.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
- 'src/core/lib/json/json.h',
- 'src/core/lib/json/json_args.h',
- 'src/core/lib/json/json_channel_args.h',
- 'src/core/lib/json/json_object_loader.h',
- 'src/core/lib/json/json_reader.h',
- 'src/core/lib/json/json_util.h',
- 'src/core/lib/json/json_writer.h',
'src/core/lib/matchers/matchers.h',
'src/core/lib/promise/activity.h',
'src/core/lib/promise/all_ok.h',
@@ -3363,6 +3356,13 @@ Pod::Spec.new do |s|
'src/core/util/http_client/httpcli.h',
'src/core/util/http_client/httpcli_ssl_credentials.h',
'src/core/util/http_client/parser.h',
+ 'src/core/util/json/json.h',
+ 'src/core/util/json/json_args.h',
+ 'src/core/util/json/json_channel_args.h',
+ 'src/core/util/json/json_object_loader.h',
+ 'src/core/util/json/json_reader.h',
+ 'src/core/util/json/json_util.h',
+ 'src/core/util/json/json_writer.h',
'src/core/util/spinlock.h',
'src/core/util/string.h',
'src/core/util/time_precise.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index 23f556bbbd3..a3bf96c838d 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -1465,17 +1465,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h )
s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.cc )
s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h )
- s.files += %w( src/core/lib/json/json.h )
- s.files += %w( src/core/lib/json/json_args.h )
- s.files += %w( src/core/lib/json/json_channel_args.h )
- s.files += %w( src/core/lib/json/json_object_loader.cc )
- s.files += %w( src/core/lib/json/json_object_loader.h )
- s.files += %w( src/core/lib/json/json_reader.cc )
- s.files += %w( src/core/lib/json/json_reader.h )
- s.files += %w( src/core/lib/json/json_util.cc )
- s.files += %w( src/core/lib/json/json_util.h )
- s.files += %w( src/core/lib/json/json_writer.cc )
- s.files += %w( src/core/lib/json/json_writer.h )
s.files += %w( src/core/lib/matchers/matchers.cc )
s.files += %w( src/core/lib/matchers/matchers.h )
s.files += %w( src/core/lib/promise/activity.cc )
@@ -1931,6 +1920,17 @@ Gem::Specification.new do |s|
s.files += %w( src/core/util/http_client/parser.cc )
s.files += %w( src/core/util/http_client/parser.h )
s.files += %w( src/core/util/iphone/cpu.cc )
+ s.files += %w( src/core/util/json/json.h )
+ s.files += %w( src/core/util/json/json_args.h )
+ s.files += %w( src/core/util/json/json_channel_args.h )
+ s.files += %w( src/core/util/json/json_object_loader.cc )
+ s.files += %w( src/core/util/json/json_object_loader.h )
+ s.files += %w( src/core/util/json/json_reader.cc )
+ s.files += %w( src/core/util/json/json_reader.h )
+ s.files += %w( src/core/util/json/json_util.cc )
+ s.files += %w( src/core/util/json/json_util.h )
+ s.files += %w( src/core/util/json/json_writer.cc )
+ s.files += %w( src/core/util/json/json_writer.h )
s.files += %w( src/core/util/linux/cpu.cc )
s.files += %w( src/core/util/linux/log.cc )
s.files += %w( src/core/util/log.cc )
diff --git a/package.xml b/package.xml
index adfc2c267e7..3eafc3e32cd 100644
--- a/package.xml
+++ b/package.xml
@@ -1447,17 +1447,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -1913,6 +1902,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/core/BUILD b/src/core/BUILD
index d88c50e3c38..56aa4f03aa8 100644
--- a/src/core/BUILD
+++ b/src/core/BUILD
@@ -4524,7 +4524,7 @@ grpc_cc_library(
grpc_cc_library(
name = "json",
hdrs = [
- "lib/json/json.h",
+ "util/json/json.h",
],
deps = ["//:gpr"],
)
@@ -4532,10 +4532,10 @@ grpc_cc_library(
grpc_cc_library(
name = "json_reader",
srcs = [
- "lib/json/json_reader.cc",
+ "util/json/json_reader.cc",
],
hdrs = [
- "lib/json/json_reader.h",
+ "util/json/json_reader.h",
],
external_deps = [
"absl/base:core_headers",
@@ -4557,10 +4557,10 @@ grpc_cc_library(
grpc_cc_library(
name = "json_writer",
srcs = [
- "lib/json/json_writer.cc",
+ "util/json/json_writer.cc",
],
hdrs = [
- "lib/json/json_writer.h",
+ "util/json/json_writer.h",
],
external_deps = ["absl/strings"],
deps = [
@@ -4571,8 +4571,8 @@ grpc_cc_library(
grpc_cc_library(
name = "json_util",
- srcs = ["lib/json/json_util.cc"],
- hdrs = ["lib/json/json_util.h"],
+ srcs = ["util/json/json_util.cc"],
+ hdrs = ["util/json/json_util.h"],
external_deps = ["absl/strings"],
deps = [
"error",
@@ -4588,15 +4588,15 @@ grpc_cc_library(
grpc_cc_library(
name = "json_args",
- hdrs = ["lib/json/json_args.h"],
+ hdrs = ["util/json/json_args.h"],
external_deps = ["absl/strings"],
deps = ["//:gpr"],
)
grpc_cc_library(
name = "json_object_loader",
- srcs = ["lib/json/json_object_loader.cc"],
- hdrs = ["lib/json/json_object_loader.h"],
+ srcs = ["util/json/json_object_loader.cc"],
+ hdrs = ["util/json/json_object_loader.h"],
external_deps = [
"absl/meta:type_traits",
"absl/status",
@@ -4617,7 +4617,7 @@ grpc_cc_library(
grpc_cc_library(
name = "json_channel_args",
- hdrs = ["lib/json/json_channel_args.h"],
+ hdrs = ["util/json/json_channel_args.h"],
external_deps = [
"absl/strings",
"absl/types:optional",
diff --git a/src/core/channelz/channel_trace.h b/src/core/channelz/channel_trace.h
index b0465b5861a..c6c245c5cf5 100644
--- a/src/core/channelz/channel_trace.h
+++ b/src/core/channelz/channel_trace.h
@@ -30,7 +30,7 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
namespace channelz {
diff --git a/src/core/channelz/channelz.cc b/src/core/channelz/channelz.cc
index 699ee188af6..1baf851ed6a 100644
--- a/src/core/channelz/channelz.cc
+++ b/src/core/channelz/channelz.cc
@@ -38,9 +38,9 @@
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/uri/uri_parser.h"
+#include "src/core/util/json/json_writer.h"
#include "src/core/util/string.h"
#include "src/core/util/useful.h"
diff --git a/src/core/channelz/channelz.h b/src/core/channelz/channelz.h
index 5ecf702c845..e441edc81a6 100644
--- a/src/core/channelz/channelz.h
+++ b/src/core/channelz/channelz.h
@@ -42,7 +42,7 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
#include "src/core/util/time_precise.h"
#include "src/core/util/useful.h"
diff --git a/src/core/channelz/channelz_registry.cc b/src/core/channelz/channelz_registry.cc
index 0ba7a2ac438..8089cc273bf 100644
--- a/src/core/channelz/channelz_registry.cc
+++ b/src/core/channelz/channelz_registry.cc
@@ -36,8 +36,8 @@
#include "src/core/channelz/channelz.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/exec_ctx.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_writer.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_writer.h"
namespace grpc_core {
namespace channelz {
diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc
index 10918a8cba7..3cb76ff8409 100644
--- a/src/core/client_channel/client_channel_filter.cc
+++ b/src/core/client_channel/client_channel_filter.cc
@@ -79,7 +79,6 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/promise/cancel_callback.h"
#include "src/core/lib/promise/context.h"
#include "src/core/lib/promise/latch.h"
@@ -103,6 +102,7 @@
#include "src/core/resolver/resolver_registry.h"
#include "src/core/service_config/service_config_call_data.h"
#include "src/core/service_config/service_config_impl.h"
+#include "src/core/util/json/json.h"
#include "src/core/util/useful.h"
//
diff --git a/src/core/client_channel/client_channel_service_config.h b/src/core/client_channel/client_channel_service_config.h
index 21778d9be18..60340e2685f 100644
--- a/src/core/client_channel/client_channel_service_config.h
+++ b/src/core/client_channel/client_channel_service_config.h
@@ -32,11 +32,11 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
namespace internal {
diff --git a/src/core/client_channel/retry_service_config.cc b/src/core/client_channel/retry_service_config.cc
index dd228d5f4f0..54a48442353 100644
--- a/src/core/client_channel/retry_service_config.cc
+++ b/src/core/client_channel/retry_service_config.cc
@@ -35,7 +35,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/config/core_configuration.h"
-#include "src/core/lib/json/json_channel_args.h"
+#include "src/core/util/json/json_channel_args.h"
// As per the retry design, we do not allow more than 5 retry attempts.
#define MAX_MAX_RETRY_ATTEMPTS 5
diff --git a/src/core/client_channel/retry_service_config.h b/src/core/client_channel/retry_service_config.h
index 7c47e3b8c5a..6e4bbc29753 100644
--- a/src/core/client_channel/retry_service_config.h
+++ b/src/core/client_channel/retry_service_config.h
@@ -32,10 +32,10 @@
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
namespace internal {
diff --git a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h
index 4cb2c1b03bb..bef8185fe27 100644
--- a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h
+++ b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h
@@ -35,10 +35,10 @@
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
// Channel arg key for enabling parsing fault injection via method config.
#define GRPC_ARG_PARSE_FAULT_INJECTION_METHOD_CONFIG \
diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h
index 1637bfe3561..200f6880883 100644
--- a/src/core/ext/filters/message_size/message_size_filter.h
+++ b/src/core/ext/filters/message_size/message_size_filter.h
@@ -34,12 +34,12 @@
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/promise/arena_promise.h"
#include "src/core/lib/transport/transport.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.cc b/src/core/ext/filters/rbac/rbac_service_config_parser.cc
index bb9b529e9f7..000440f5274 100644
--- a/src/core/ext/filters/rbac/rbac_service_config_parser.cc
+++ b/src/core/ext/filters/rbac/rbac_service_config_parser.cc
@@ -31,10 +31,10 @@
#include
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/matchers/matchers.h"
#include "src/core/lib/security/authorization/audit_logging.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.h b/src/core/ext/filters/rbac/rbac_service_config_parser.h
index 4d1ff294d14..728a92e1bf0 100644
--- a/src/core/ext/filters/rbac/rbac_service_config_parser.h
+++ b/src/core/ext/filters/rbac/rbac_service_config_parser.h
@@ -31,10 +31,10 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/security/authorization/grpc_authorization_engine.h"
#include "src/core/lib/security/authorization/rbac_policy.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h
index 876c0fda405..ccb6245b28f 100644
--- a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h
+++ b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h
@@ -32,10 +32,10 @@
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
// Channel arg key for enabling parsing fault injection via method config.
#define GRPC_ARG_PARSE_STATEFUL_SESSION_METHOD_CONFIG \
diff --git a/src/core/lib/security/authorization/rbac_translator.cc b/src/core/lib/security/authorization/rbac_translator.cc
index 7ae89a4d7a8..1dbbe8bf16d 100644
--- a/src/core/lib/security/authorization/rbac_translator.cc
+++ b/src/core/lib/security/authorization/rbac_translator.cc
@@ -37,10 +37,10 @@
#include
#include
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_reader.h"
#include "src/core/lib/matchers/matchers.h"
#include "src/core/lib/security/authorization/audit_logging.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_reader.h"
#include "src/core/util/useful.h"
namespace grpc_core {
diff --git a/src/core/lib/security/certificate_provider/certificate_provider_factory.h b/src/core/lib/security/certificate_provider/certificate_provider_factory.h
index 6d1b36e7b20..719561a1eec 100644
--- a/src/core/lib/security/certificate_provider/certificate_provider_factory.h
+++ b/src/core/lib/security/certificate_provider/certificate_provider_factory.h
@@ -30,8 +30,8 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
namespace grpc_core {
diff --git a/src/core/lib/security/credentials/channel_creds_registry.h b/src/core/lib/security/credentials/channel_creds_registry.h
index 3c3ade7e5be..8fa2462f2ba 100644
--- a/src/core/lib/security/credentials/channel_creds_registry.h
+++ b/src/core/lib/security/credentials/channel_creds_registry.h
@@ -29,8 +29,8 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
struct grpc_channel_credentials;
diff --git a/src/core/lib/security/credentials/channel_creds_registry_init.cc b/src/core/lib/security/credentials/channel_creds_registry_init.cc
index 4f19760f377..9b7a0e04372 100644
--- a/src/core/lib/security/credentials/channel_creds_registry_init.cc
+++ b/src/core/lib/security/credentials/channel_creds_registry_init.cc
@@ -34,9 +34,6 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/security/credentials/channel_creds_registry.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/fake/fake_credentials.h"
@@ -44,6 +41,9 @@
#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
#include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h"
#include "src/core/lib/security/credentials/tls/tls_credentials.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc
index 1529f5c0a6c..27d1b88ef1a 100644
--- a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc
+++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc
@@ -40,12 +40,12 @@
#include "src/core/lib/gprpp/env.h"
#include "src/core/lib/iomgr/closure.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_reader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/util/http_client/httpcli_ssl_credentials.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_reader.h"
+#include "src/core/util/json/json_writer.h"
namespace grpc_core {
diff --git a/src/core/lib/security/credentials/external/external_account_credentials.cc b/src/core/lib/security/credentials/external/external_account_credentials.cc
index 08634e86d99..f7fd5a805e1 100644
--- a/src/core/lib/security/credentials/external/external_account_credentials.cc
+++ b/src/core/lib/security/credentials/external/external_account_credentials.cc
@@ -46,8 +46,6 @@
#include
#include "src/core/lib/gprpp/status_helper.h"
-#include "src/core/lib/json/json_reader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/external/aws_external_account_credentials.h"
#include "src/core/lib/security/credentials/external/file_external_account_credentials.h"
@@ -56,6 +54,8 @@
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/util/http_client/httpcli_ssl_credentials.h"
#include "src/core/util/http_client/parser.h"
+#include "src/core/util/json/json_reader.h"
+#include "src/core/util/json/json_writer.h"
#define EXTERNAL_ACCOUNT_CREDENTIALS_GRANT_TYPE \
"urn:ietf:params:oauth:grant-type:token-exchange"
diff --git a/src/core/lib/security/credentials/external/external_account_credentials.h b/src/core/lib/security/credentials/external/external_account_credentials.h
index af8c2736d00..f0023ab878e 100644
--- a/src/core/lib/security/credentials/external/external_account_credentials.h
+++ b/src/core/lib/security/credentials/external/external_account_credentials.h
@@ -33,10 +33,10 @@
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/polling_entity.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include "src/core/util/http_client/httpcli.h"
#include "src/core/util/http_client/parser.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/lib/security/credentials/external/file_external_account_credentials.cc b/src/core/lib/security/credentials/external/file_external_account_credentials.cc
index 472a1cabb39..0bbef7b8a07 100644
--- a/src/core/lib/security/credentials/external/file_external_account_credentials.cc
+++ b/src/core/lib/security/credentials/external/file_external_account_credentials.cc
@@ -27,10 +27,10 @@
#include
#include "src/core/lib/gprpp/load_file.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_reader.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_reader.h"
namespace grpc_core {
diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.cc b/src/core/lib/security/credentials/external/url_external_account_credentials.cc
index 8b01d60eb15..b2a5359c596 100644
--- a/src/core/lib/security/credentials/external/url_external_account_credentials.cc
+++ b/src/core/lib/security/credentials/external/url_external_account_credentials.cc
@@ -38,12 +38,12 @@
#include
#include "src/core/lib/iomgr/closure.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_reader.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/util/http_client/httpcli_ssl_credentials.h"
#include "src/core/util/http_client/parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_reader.h"
namespace grpc_core {
diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc
index a0bc5d8ba14..3e6b843b972 100644
--- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc
+++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc
@@ -55,8 +55,6 @@
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/pollset.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_reader.h"
#include "src/core/lib/security/credentials/alts/check_gcp_environment.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/external/external_account_credentials.h"
@@ -72,6 +70,8 @@
#include "src/core/load_balancing/xds/xds_channel_args.h"
#include "src/core/util/http_client/httpcli.h"
#include "src/core/util/http_client/parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_reader.h"
using grpc_core::Json;
diff --git a/src/core/lib/security/credentials/jwt/json_token.cc b/src/core/lib/security/credentials/jwt/json_token.cc
index 2f1c5c35fc4..456ff99dd4f 100644
--- a/src/core/lib/security/credentials/jwt/json_token.cc
+++ b/src/core/lib/security/credentials/jwt/json_token.cc
@@ -45,9 +45,9 @@
#include
#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/json/json_reader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/security/util/json_util.h"
+#include "src/core/util/json/json_reader.h"
+#include "src/core/util/json/json_writer.h"
using grpc_core::Json;
diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h
index 3b2c7d5c348..5576b643ce1 100644
--- a/src/core/lib/security/credentials/jwt/json_token.h
+++ b/src/core/lib/security/credentials/jwt/json_token.h
@@ -24,7 +24,7 @@
#include
#include
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
// --- Constants. ---
diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.cc b/src/core/lib/security/credentials/jwt/jwt_credentials.cc
index b1ae58f2dea..398a898f2b2 100644
--- a/src/core/lib/security/credentials/jwt/jwt_credentials.cc
+++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc
@@ -40,14 +40,14 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/exec_ctx.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_reader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/security/credentials/call_creds_util.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/uri/uri_parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_reader.h"
+#include "src/core/util/json/json_writer.h"
using grpc_core::Json;
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc
index 3eb8c5a2084..e88b909696f 100644
--- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc
+++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc
@@ -63,7 +63,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/polling_entity.h"
-#include "src/core/lib/json/json_reader.h"
#include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
@@ -72,6 +71,7 @@
#include "src/core/util/http_client/httpcli.h"
#include "src/core/util/http_client/httpcli_ssl_credentials.h"
#include "src/core/util/http_client/parser.h"
+#include "src/core/util/json/json_reader.h"
#include "src/core/util/string.h"
using grpc_core::Json;
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h
index 814c40204a3..922da79d4c9 100644
--- a/src/core/lib/security/credentials/jwt/jwt_verifier.h
+++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h
@@ -26,7 +26,7 @@
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
// --- Constants. ---
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
index 9c37bf6ee8c..834dae28305 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
@@ -53,8 +53,6 @@
#include "src/core/lib/gprpp/status_helper.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_reader.h"
#include "src/core/lib/promise/context.h"
#include "src/core/lib/promise/poll.h"
#include "src/core/lib/promise/promise.h"
@@ -64,6 +62,8 @@
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/util/http_client/httpcli_ssl_credentials.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_reader.h"
using grpc_core::Json;
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
index 60c369ac548..199f35f33c8 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
@@ -40,7 +40,6 @@
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/polling_entity.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/promise/activity.h"
#include "src/core/lib/promise/arena_promise.h"
#include "src/core/lib/security/credentials/credentials.h"
@@ -49,6 +48,7 @@
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/util/http_client/httpcli.h"
#include "src/core/util/http_client/parser.h"
+#include "src/core/util/json/json.h"
#include "src/core/util/useful.h"
// Constants.
diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h
index b7dff369a6e..6425d32aaf7 100644
--- a/src/core/lib/security/util/json_util.h
+++ b/src/core/lib/security/util/json_util.h
@@ -22,7 +22,7 @@
#include
#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
// Constants.
#define GRPC_AUTH_JSON_TYPE_INVALID "invalid"
diff --git a/src/core/load_balancing/endpoint_list.cc b/src/core/load_balancing/endpoint_list.cc
index 84b5848e7b9..261711ba81a 100644
--- a/src/core/load_balancing/endpoint_list.cc
+++ b/src/core/load_balancing/endpoint_list.cc
@@ -38,12 +38,12 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
#include "src/core/load_balancing/delegating_helper.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/load_balancing/pick_first/pick_first.h"
#include "src/core/resolver/endpoint_addresses.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/grpclb/grpclb.cc b/src/core/load_balancing/grpclb/grpclb.cc
index fcc3034bf03..e4aadff0d90 100644
--- a/src/core/load_balancing/grpclb/grpclb.cc
+++ b/src/core/load_balancing/grpclb/grpclb.cc
@@ -117,9 +117,6 @@
#include "src/core/lib/iomgr/resolved_address.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/socket_utils.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_string_helpers.h"
@@ -141,6 +138,9 @@
#include "src/core/resolver/endpoint_addresses.h"
#include "src/core/resolver/fake/fake_resolver.h"
#include "src/core/resolver/resolver.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
#include "src/core/util/string.h"
#include "src/core/util/useful.h"
diff --git a/src/core/load_balancing/lb_policy_factory.h b/src/core/load_balancing/lb_policy_factory.h
index b4116f5ff30..697a5321667 100644
--- a/src/core/load_balancing/lb_policy_factory.h
+++ b/src/core/load_balancing/lb_policy_factory.h
@@ -24,8 +24,8 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
-#include "src/core/lib/json/json.h"
#include "src/core/load_balancing/lb_policy.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/lb_policy_registry.h b/src/core/load_balancing/lb_policy_registry.h
index dea9b5ad277..44d1e487522 100644
--- a/src/core/load_balancing/lb_policy_registry.h
+++ b/src/core/load_balancing/lb_policy_registry.h
@@ -27,9 +27,9 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
-#include "src/core/lib/json/json.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/load_balancing/lb_policy_factory.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/outlier_detection/outlier_detection.cc b/src/core/load_balancing/outlier_detection/outlier_detection.cc
index ffafdedbf86..2545345cf33 100644
--- a/src/core/load_balancing/outlier_detection/outlier_detection.cc
+++ b/src/core/load_balancing/outlier_detection/outlier_detection.cc
@@ -62,7 +62,6 @@
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/child_policy_handler.h"
#include "src/core/load_balancing/delegating_helper.h"
@@ -72,6 +71,7 @@
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/load_balancing/subchannel_interface.h"
#include "src/core/resolver/endpoint_addresses.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/outlier_detection/outlier_detection.h b/src/core/load_balancing/outlier_detection/outlier_detection.h
index 468591ddfc7..ba5767914ec 100644
--- a/src/core/load_balancing/outlier_detection/outlier_detection.h
+++ b/src/core/load_balancing/outlier_detection/outlier_detection.h
@@ -25,9 +25,9 @@
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/pick_first/pick_first.cc b/src/core/load_balancing/pick_first/pick_first.cc
index d22fe292b6a..47b43a30114 100644
--- a/src/core/load_balancing/pick_first/pick_first.cc
+++ b/src/core/load_balancing/pick_first/pick_first.cc
@@ -55,9 +55,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/health_check_client.h"
#include "src/core/load_balancing/lb_policy.h"
@@ -65,6 +62,9 @@
#include "src/core/load_balancing/subchannel_interface.h"
#include "src/core/resolver/endpoint_addresses.h"
#include "src/core/telemetry/metrics.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
#include "src/core/util/useful.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/priority/priority.cc b/src/core/load_balancing/priority/priority.cc
index 2c8d483055b..114ca5df053 100644
--- a/src/core/load_balancing/priority/priority.cc
+++ b/src/core/load_balancing/priority/priority.cc
@@ -51,9 +51,6 @@
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/address_filtering.h"
#include "src/core/load_balancing/child_policy_handler.h"
@@ -62,6 +59,9 @@
#include "src/core/load_balancing/lb_policy_factory.h"
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/resolver/endpoint_addresses.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/ring_hash/ring_hash.cc b/src/core/load_balancing/ring_hash/ring_hash.cc
index 114c13b645a..87f4e722105 100644
--- a/src/core/load_balancing/ring_hash/ring_hash.cc
+++ b/src/core/load_balancing/ring_hash/ring_hash.cc
@@ -60,7 +60,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/delegating_helper.h"
#include "src/core/load_balancing/lb_policy.h"
@@ -68,6 +67,7 @@
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/load_balancing/pick_first/pick_first.h"
#include "src/core/resolver/endpoint_addresses.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/ring_hash/ring_hash.h b/src/core/load_balancing/ring_hash/ring_hash.h
index 001de901543..c5f6205e170 100644
--- a/src/core/load_balancing/ring_hash/ring_hash.h
+++ b/src/core/load_balancing/ring_hash/ring_hash.h
@@ -23,10 +23,10 @@
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/service_config/service_config_call_data.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/rls/rls.cc b/src/core/load_balancing/rls/rls.cc
index 26bd71d0dda..57caea01739 100644
--- a/src/core/load_balancing/rls/rls.cc
+++ b/src/core/load_balancing/rls/rls.cc
@@ -87,10 +87,6 @@
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/security/credentials/fake/fake_credentials.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
@@ -107,6 +103,10 @@
#include "src/core/resolver/resolver_registry.h"
#include "src/core/service_config/service_config_impl.h"
#include "src/core/telemetry/metrics.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
+#include "src/core/util/json/json_writer.h"
#include "src/proto/grpc/lookup/v1/rls.upb.h"
using ::grpc_event_engine::experimental::EventEngine;
diff --git a/src/core/load_balancing/round_robin/round_robin.cc b/src/core/load_balancing/round_robin/round_robin.cc
index 27f7f8b0a21..f149d153078 100644
--- a/src/core/load_balancing/round_robin/round_robin.cc
+++ b/src/core/load_balancing/round_robin/round_robin.cc
@@ -44,12 +44,12 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/work_serializer.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/endpoint_list.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/load_balancing/lb_policy_factory.h"
#include "src/core/resolver/endpoint_addresses.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc
index f750b0ae0a0..e4f805f7384 100644
--- a/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc
+++ b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc
@@ -58,9 +58,6 @@
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/backend_metric_data.h"
#include "src/core/load_balancing/endpoint_list.h"
@@ -74,6 +71,9 @@
#include "src/core/telemetry/metrics.h"
#include "src/core/telemetry/stats.h"
#include "src/core/telemetry/stats_data.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/weighted_target/weighted_target.cc b/src/core/load_balancing/weighted_target/weighted_target.cc
index 19f5c9d5bcf..61c4777851d 100644
--- a/src/core/load_balancing/weighted_target/weighted_target.cc
+++ b/src/core/load_balancing/weighted_target/weighted_target.cc
@@ -54,9 +54,6 @@
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/address_filtering.h"
#include "src/core/load_balancing/child_policy_handler.h"
@@ -65,6 +62,9 @@
#include "src/core/load_balancing/lb_policy_factory.h"
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/resolver/endpoint_addresses.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
// IWYU pragma: no_include
diff --git a/src/core/load_balancing/xds/cds.cc b/src/core/load_balancing/xds/cds.cc
index be516ce09c9..88813f87d78 100644
--- a/src/core/load_balancing/xds/cds.cc
+++ b/src/core/load_balancing/xds/cds.cc
@@ -49,10 +49,6 @@
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/load_balancing/address_filtering.h"
#include "src/core/load_balancing/delegating_helper.h"
#include "src/core/load_balancing/lb_policy.h"
@@ -61,6 +57,10 @@
#include "src/core/load_balancing/outlier_detection/outlier_detection.h"
#include "src/core/load_balancing/xds/xds_channel_args.h"
#include "src/core/resolver/xds/xds_dependency_manager.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
+#include "src/core/util/json/json_writer.h"
#include "src/core/xds/grpc/xds_cluster.h"
#include "src/core/xds/grpc/xds_common_types.h"
#include "src/core/xds/grpc/xds_health_status.h"
diff --git a/src/core/load_balancing/xds/xds_cluster_impl.cc b/src/core/load_balancing/xds/xds_cluster_impl.cc
index 6ea74538a36..25b6a0c464a 100644
--- a/src/core/load_balancing/xds/xds_cluster_impl.cc
+++ b/src/core/load_balancing/xds/xds_cluster_impl.cc
@@ -51,9 +51,6 @@
#include "src/core/lib/gprpp/validation_errors.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/security/credentials/xds/xds_credentials.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/backend_metric_data.h"
@@ -67,6 +64,9 @@
#include "src/core/resolver/endpoint_addresses.h"
#include "src/core/resolver/xds/xds_dependency_manager.h"
#include "src/core/telemetry/call_tracer.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
#include "src/core/xds/grpc/xds_bootstrap_grpc.h"
#include "src/core/xds/grpc/xds_client_grpc.h"
#include "src/core/xds/grpc/xds_endpoint.h"
diff --git a/src/core/load_balancing/xds/xds_cluster_manager.cc b/src/core/load_balancing/xds/xds_cluster_manager.cc
index f2aea70f293..5c4b8e641bc 100644
--- a/src/core/load_balancing/xds/xds_cluster_manager.cc
+++ b/src/core/load_balancing/xds/xds_cluster_manager.cc
@@ -49,9 +49,6 @@
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/child_policy_handler.h"
#include "src/core/load_balancing/delegating_helper.h"
@@ -60,6 +57,9 @@
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/resolver/endpoint_addresses.h"
#include "src/core/resolver/xds/xds_resolver_attributes.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/xds/xds_override_host.cc b/src/core/load_balancing/xds/xds_override_host.cc
index 41b3eb36ef6..06b73fc509f 100644
--- a/src/core/load_balancing/xds/xds_override_host.cc
+++ b/src/core/load_balancing/xds/xds_override_host.cc
@@ -70,9 +70,6 @@
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolved_address.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/load_balancing/child_policy_handler.h"
#include "src/core/load_balancing/delegating_helper.h"
@@ -82,6 +79,9 @@
#include "src/core/load_balancing/subchannel_interface.h"
#include "src/core/resolver/endpoint_addresses.h"
#include "src/core/resolver/xds/xds_dependency_manager.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
#include "src/core/xds/grpc/xds_health_status.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/xds/xds_override_host.h b/src/core/load_balancing/xds/xds_override_host.h
index 392f325ec35..226b55dee01 100644
--- a/src/core/load_balancing/xds/xds_override_host.h
+++ b/src/core/load_balancing/xds/xds_override_host.h
@@ -23,10 +23,10 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
#include "src/core/load_balancing/lb_policy.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/load_balancing/xds/xds_wrr_locality.cc b/src/core/load_balancing/xds/xds_wrr_locality.cc
index ac79f69f417..0d2ea0472b2 100644
--- a/src/core/load_balancing/xds/xds_wrr_locality.cc
+++ b/src/core/load_balancing/xds/xds_wrr_locality.cc
@@ -40,16 +40,16 @@
#include "src/core/lib/gprpp/ref_counted_string.h"
#include "src/core/lib/gprpp/validation_errors.h"
#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/load_balancing/delegating_helper.h"
#include "src/core/load_balancing/lb_policy.h"
#include "src/core/load_balancing/lb_policy_factory.h"
#include "src/core/load_balancing/lb_policy_registry.h"
#include "src/core/load_balancing/xds/xds_channel_args.h"
#include "src/core/resolver/endpoint_addresses.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
+#include "src/core/util/json/json_writer.h"
#include "src/core/xds/xds_client/xds_client_stats.h"
namespace grpc_core {
diff --git a/src/core/resolver/dns/event_engine/service_config_helper.cc b/src/core/resolver/dns/event_engine/service_config_helper.cc
index 40b932b8deb..92cea5ec517 100644
--- a/src/core/resolver/dns/event_engine/service_config_helper.cc
+++ b/src/core/resolver/dns/event_engine/service_config_helper.cc
@@ -25,11 +25,11 @@
#include "src/core/lib/gprpp/status_helper.h"
#include "src/core/lib/iomgr/gethostname.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
-#include "src/core/lib/json/json_reader.h"
-#include "src/core/lib/json/json_writer.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
+#include "src/core/util/json/json_reader.h"
+#include "src/core/util/json/json_writer.h"
namespace grpc_core {
diff --git a/src/core/resolver/google_c2p/google_c2p_resolver.cc b/src/core/resolver/google_c2p/google_c2p_resolver.cc
index d58e9a81b3e..74239361742 100644
--- a/src/core/resolver/google_c2p/google_c2p_resolver.cc
+++ b/src/core/resolver/google_c2p/google_c2p_resolver.cc
@@ -43,14 +43,14 @@
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/polling_entity.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/security/credentials/alts/check_gcp_environment.h"
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/resolver/resolver.h"
#include "src/core/resolver/resolver_factory.h"
#include "src/core/resolver/resolver_registry.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_writer.h"
#include "src/core/xds/grpc/xds_client_grpc.h"
#include "src/core/xds/xds_client/xds_bootstrap.h"
diff --git a/src/core/service_config/service_config_impl.cc b/src/core/service_config/service_config_impl.cc
index 78b66bd7f43..034e635690b 100644
--- a/src/core/service_config/service_config_impl.cc
+++ b/src/core/service_config/service_config_impl.cc
@@ -31,14 +31,14 @@
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
-#include "src/core/lib/json/json_reader.h"
-#include "src/core/lib/json/json_writer.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
+#include "src/core/util/json/json_reader.h"
+#include "src/core/util/json/json_writer.h"
namespace grpc_core {
diff --git a/src/core/service_config/service_config_impl.h b/src/core/service_config/service_config_impl.h
index 3b5b96e182d..f617163a956 100644
--- a/src/core/service_config/service_config_impl.h
+++ b/src/core/service_config/service_config_impl.h
@@ -35,10 +35,10 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/service_config/service_config.h"
#include "src/core/service_config/service_config_parser.h"
+#include "src/core/util/json/json.h"
// The main purpose of the code here is to parse the service config in
// JSON form, which will look like this:
diff --git a/src/core/service_config/service_config_parser.h b/src/core/service_config/service_config_parser.h
index d911f869ad0..9b7983a7680 100644
--- a/src/core/service_config/service_config_parser.h
+++ b/src/core/service_config/service_config_parser.h
@@ -30,7 +30,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
diff --git a/src/core/lib/json/json.h b/src/core/util/json/json.h
similarity index 86%
rename from src/core/lib/json/json.h
rename to src/core/util/json/json.h
index 6ffa7e77975..9dbc95e3b94 100644
--- a/src/core/lib/json/json.h
+++ b/src/core/util/json/json.h
@@ -14,16 +14,17 @@
// limitations under the License.
//
-#ifndef GRPC_SRC_CORE_LIB_JSON_JSON_H
-#define GRPC_SRC_CORE_LIB_JSON_JSON_H
+#ifndef GRPC_SRC_CORE_UTIL_JSON_JSON_H
+#define GRPC_SRC_CORE_UTIL_JSON_JSON_H
-#include
#include
+#include
+
namespace grpc_core {
using Json = experimental::Json;
} // namespace grpc_core
-#endif // GRPC_SRC_CORE_LIB_JSON_JSON_H
+#endif // GRPC_SRC_CORE_UTIL_JSON_JSON_H
diff --git a/src/core/lib/json/json_args.h b/src/core/util/json/json_args.h
similarity index 86%
rename from src/core/lib/json/json_args.h
rename to src/core/util/json/json_args.h
index 875b1f477d2..5fe104552c7 100644
--- a/src/core/lib/json/json_args.h
+++ b/src/core/util/json/json_args.h
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef GRPC_SRC_CORE_LIB_JSON_JSON_ARGS_H
-#define GRPC_SRC_CORE_LIB_JSON_JSON_ARGS_H
-
-#include "absl/strings/string_view.h"
+#ifndef GRPC_SRC_CORE_UTIL_JSON_JSON_ARGS_H
+#define GRPC_SRC_CORE_UTIL_JSON_JSON_ARGS_H
#include
+#include "absl/strings/string_view.h"
+
namespace grpc_core {
class JsonArgs {
@@ -31,4 +31,4 @@ class JsonArgs {
} // namespace grpc_core
-#endif // GRPC_SRC_CORE_LIB_JSON_JSON_ARGS_H
+#endif // GRPC_SRC_CORE_UTIL_JSON_JSON_ARGS_H
diff --git a/src/core/lib/json/json_channel_args.h b/src/core/util/json/json_channel_args.h
similarity index 84%
rename from src/core/lib/json/json_channel_args.h
rename to src/core/util/json/json_channel_args.h
index 82fb8536760..fe64a377faa 100644
--- a/src/core/lib/json/json_channel_args.h
+++ b/src/core/util/json/json_channel_args.h
@@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef GRPC_SRC_CORE_LIB_JSON_JSON_CHANNEL_ARGS_H
-#define GRPC_SRC_CORE_LIB_JSON_JSON_CHANNEL_ARGS_H
+#ifndef GRPC_SRC_CORE_UTIL_JSON_JSON_CHANNEL_ARGS_H
+#define GRPC_SRC_CORE_UTIL_JSON_JSON_CHANNEL_ARGS_H
+
+#include
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
-#include
-
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/json/json_args.h"
+#include "src/core/util/json/json_args.h"
namespace grpc_core {
@@ -39,4 +39,4 @@ class JsonChannelArgs : public JsonArgs {
} // namespace grpc_core
-#endif // GRPC_SRC_CORE_LIB_JSON_JSON_CHANNEL_ARGS_H
+#endif // GRPC_SRC_CORE_UTIL_JSON_JSON_CHANNEL_ARGS_H
diff --git a/src/core/lib/json/json_object_loader.cc b/src/core/util/json/json_object_loader.cc
similarity index 99%
rename from src/core/lib/json/json_object_loader.cc
rename to src/core/util/json/json_object_loader.cc
index f7e445be1e1..0d6dd4588a5 100644
--- a/src/core/lib/json/json_object_loader.cc
+++ b/src/core/util/json/json_object_loader.cc
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/core/lib/json/json_object_loader.h"
+#include
+
+#include "src/core/util/json/json_object_loader.h"
#include
@@ -21,7 +23,6 @@
#include "absl/strings/strip.h"
#include
-#include
namespace grpc_core {
namespace json_detail {
diff --git a/src/core/lib/json/json_object_loader.h b/src/core/util/json/json_object_loader.h
similarity index 98%
rename from src/core/lib/json/json_object_loader.h
rename to src/core/util/json/json_object_loader.h
index f6295d07aa2..03bce3efefd 100644
--- a/src/core/lib/json/json_object_loader.h
+++ b/src/core/util/json/json_object_loader.h
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef GRPC_SRC_CORE_LIB_JSON_JSON_OBJECT_LOADER_H
-#define GRPC_SRC_CORE_LIB_JSON_JSON_OBJECT_LOADER_H
+#ifndef GRPC_SRC_CORE_UTIL_JSON_JSON_OBJECT_LOADER_H
+#define GRPC_SRC_CORE_UTIL_JSON_JSON_OBJECT_LOADER_H
+
+#include
#include
#include
@@ -30,14 +32,12 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
-#include
-
#include "src/core/lib/gprpp/no_destruct.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json.h"
-#include "src/core/lib/json/json_args.h"
+#include "src/core/util/json/json.h"
+#include "src/core/util/json/json_args.h"
// Provides a means to load JSON objects into C++ objects, with the aim of
// minimizing object code size.
@@ -642,4 +642,4 @@ absl::optional LoadJsonObjectField(const Json::Object& json,
} // namespace grpc_core
-#endif // GRPC_SRC_CORE_LIB_JSON_JSON_OBJECT_LOADER_H
+#endif // GRPC_SRC_CORE_UTIL_JSON_JSON_OBJECT_LOADER_H
diff --git a/src/core/lib/json/json_reader.cc b/src/core/util/json/json_reader.cc
similarity index 99%
rename from src/core/lib/json/json_reader.cc
rename to src/core/util/json/json_reader.cc
index ae249b3824c..291e96544d6 100644
--- a/src/core/lib/json/json_reader.cc
+++ b/src/core/util/json/json_reader.cc
@@ -14,6 +14,8 @@
// limitations under the License.
//
+#include
+
#include
#include
@@ -35,10 +37,9 @@
#include
#include
-#include
#include "src/core/lib/gprpp/match.h"
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
#define GRPC_JSON_MAX_DEPTH 255
#define GRPC_JSON_MAX_ERRORS 16
diff --git a/src/core/lib/json/json_reader.h b/src/core/util/json/json_reader.h
similarity index 82%
rename from src/core/lib/json/json_reader.h
rename to src/core/util/json/json_reader.h
index fa26f130a66..2b16d911981 100644
--- a/src/core/lib/json/json_reader.h
+++ b/src/core/util/json/json_reader.h
@@ -14,15 +14,15 @@
// limitations under the License.
//
-#ifndef GRPC_SRC_CORE_LIB_JSON_JSON_READER_H
-#define GRPC_SRC_CORE_LIB_JSON_JSON_READER_H
+#ifndef GRPC_SRC_CORE_UTIL_JSON_JSON_READER_H
+#define GRPC_SRC_CORE_UTIL_JSON_JSON_READER_H
+
+#include
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
-#include
-
-#include "src/core/lib/json/json.h"
+#include "src/core/util/json/json.h"
namespace grpc_core {
@@ -31,4 +31,4 @@ absl::StatusOr JsonParse(absl::string_view json_str);
} // namespace grpc_core
-#endif // GRPC_SRC_CORE_LIB_JSON_JSON_READER_H
+#endif // GRPC_SRC_CORE_UTIL_JSON_JSON_READER_H
diff --git a/src/core/lib/json/json_util.cc b/src/core/util/json/json_util.cc
similarity index 96%
rename from src/core/lib/json/json_util.cc
rename to src/core/util/json/json_util.cc
index ca6541a1c1e..8faa7cd8f25 100644
--- a/src/core/lib/json/json_util.cc
+++ b/src/core/util/json/json_util.cc
@@ -16,14 +16,14 @@
//
//
-#include "src/core/lib/json/json_util.h"
-
#include
+#include "src/core/util/json/json_util.h"
+
#include "src/core/lib/gprpp/no_destruct.h"
#include "src/core/lib/gprpp/validation_errors.h"
-#include "src/core/lib/json/json_args.h"
-#include "src/core/lib/json/json_object_loader.h"
+#include "src/core/util/json/json_args.h"
+#include "src/core/util/json/json_object_loader.h"
namespace grpc_core {
diff --git a/src/core/lib/json/json_util.h b/src/core/util/json/json_util.h
similarity index 97%
rename from src/core/lib/json/json_util.h
rename to src/core/util/json/json_util.h
index da98a2b67fd..da45b74b3c3 100644
--- a/src/core/lib/json/json_util.h
+++ b/src/core/util/json/json_util.h
@@ -16,8 +16,10 @@
//
//
-#ifndef GRPC_SRC_CORE_LIB_JSON_JSON_UTIL_H
-#define GRPC_SRC_CORE_LIB_JSON_JSON_UTIL_H
+#ifndef GRPC_SRC_CORE_UTIL_JSON_JSON_UTIL_H
+#define GRPC_SRC_CORE_UTIL_JSON_JSON_UTIL_H
+
+#include
#include
#include