Skip to content

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

Merged
ehsavoie merged 1 commit into
a2aproject:mainfrom
girishkvs:explicit_json_nulls
Sep 24, 2026
Merged

ehsavoie merged 1 commit into
a2aproject:mainfrom
girishkvs:explicit_json_nulls

Conversation

@girishkvs

@girishkvs girishkvs commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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.

@ehsavoie
ehsavoie merged commit ec5994a into a2aproject:main Sep 24, 2026
15 checks passed
@ehsavoie

Copy link
Copy Markdown
Collaborator

Thanks @girishkvs

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

Labels

None yet

Projects

None yet

2 participants