Skip to content

feat: Move from Jackson to Gson serialization#807

Draft
kabir wants to merge 2 commits into0.3.xfrom
0.3.x-compat
Draft

feat: Move from Jackson to Gson serialization#807
kabir wants to merge 2 commits into0.3.xfrom
0.3.x-compat

Conversation

@kabir
Copy link
Copy Markdown
Collaborator

@kabir kabir commented Apr 22, 2026

  • Replacing Jackson with Gson for json (de)serialization
  • Update workflows + Kafka version
  • Various fixes for the TCK
  • fixes discovered reviewing the code relating to security hardening, JSON serialization correctness, and spec compliance. (a lot of this happened in temporary PR feat: Move from Jackson to Gson serialization #808)

ehsavoie and others added 2 commits April 13, 2026 13:22
Replacing Jackson with Gson for json (de)serialization

Fixes #<issue_number_goes_here> 🦕

---------

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Co-authored-by: Kabir Khan <kkhan@redhat.com>
* chore: updating the workflows

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>

* chore: fixing javadoc

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>

* chore: Updating kafka version

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>

* fix; Fixing the last issues to be able to pass the TCK again

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>

* fix: Fixing the missing id in the jsonrpc response

Extract request id before jsonrpc validation so error responses include top-level id.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>

---------

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
@kabir kabir marked this pull request as draft April 22, 2026 09:33
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the A2A Java SDK from Jackson to Gson, introducing a centralized JsonUtil and custom exceptions to decouple the SDK from specific JSON implementations. Feedback identifies a critical security vulnerability in JsonUtil related to unsafe class instantiation from untrusted input (CWE-470). The reviewer also recommends aligning the gRPC utility configuration with the central JsonUtil to ensure consistency, using long integers for IDs to prevent data truncation, and fixing serialization logic for complex error data. Additionally, suggestions are provided to clean up misplaced dependency exclusions in the POM and rename the OBJECT_MAPPER constant to a more library-agnostic term.

Comment thread spec/src/main/java/io/a2a/json/JsonUtil.java
Comment thread pom.xml
Comment thread spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java
Comment thread spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java
Comment thread spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java
Comment thread spec/src/main/java/io/a2a/json/JsonUtil.java
@kabir kabir changed the title feat: Replace Jackson with Gson for json (de) serialization feat: Move from Jackson to Gson serialization Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants