Skip to content

fix(grpc): preserve explicit JSON nulls in value mappings - #1174

Open
girishkvs wants to merge 1 commit into
a2aproject:mainfrom
girishkvs:explicit_json_nulls
Open

girishkvs wants to merge 1 commit into
a2aproject:mainfrom
girishkvs:explicit_json_nulls

Conversation

@girishkvs

@girishkvs girishkvs commented Sep 23, 2026

Copy link
Copy Markdown

Summary

Preserve explicit JSON null values when converting protobuf structured data and metadata.

Fixes #1159.
Fixes #1160.

Reports: @lyingparachute and @RemigiuszDudek.

Changes

File What
A2ACommonFieldMapper.java Populate a HashMap instead of using the null-hostile collector, keeping keys with null values. Convert outbound Java nulls to protobuf NULL_VALUE instead of leaving the value kind unset.
A2ACommonFieldMapperTest.java, JSONRPCUtilsTest.java, ToProtoTest.java Add ten regressions covering nested data and metadata, null list elements, message/task mapping, and JSON-RPC round trips.

Existing absent/empty-Struct and metadata defaults are preserved. No constructor, collection-helper, dependency, or generated-source changes.

Validation

  • Clean Java 17 affected-module build: mvn -B -ntp -pl spec-grpc -am clean package.
  • 335 tests passed; zero failures, errors, or skips, covering the parent, common, spec, jsonrpc-common, and spec-grpc reactor.
  • git diff --check.

The full repository, other JDK versions, and transport/TCK suites were not run locally.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant