Skip to content

support FileContent deserialization#46

Merged
tomsun28 merged 1 commit intoa2ap:mainfrom
flycloud-hz:fix-filecontent-deserialization
Nov 24, 2025
Merged

support FileContent deserialization#46
tomsun28 merged 1 commit intoa2ap:mainfrom
flycloud-hz:fix-filecontent-deserialization

Conversation

@flycloud-hz
Copy link
Copy Markdown
Contributor

What's changed?

In a2a server request with file part could not be deserialized correctly.

here is the error message

11:06:43.197 [main] ERROR io.github.a2ap.core.client.impl.DefaultA2AClient - JSON-RPC error when sending message: code=-32602, message=Invalid params, data=Cannot construct instance of `io.github.a2ap.core.model.FileContent` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
 at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: io.github.a2ap.core.model.MessageSendParams["message"]->io.github.a2ap.core.model.Message["parts"]->java.util.ArrayList[0]->io.github.a2ap.core.model.FilePart["file"])
11:06:43.198 [main] ERROR io.github.a2ap.core.client.impl.DefaultA2AClient - Error sending message to system-cloud: Invalid params

This change includes annotations to support concrete FileContent subclasses.

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Any Else Note

@flycloud-hz
Copy link
Copy Markdown
Contributor Author

@tomsun28 Could you please help review this? Thanks.

Copy link
Copy Markdown
Member

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

👍

@tomsun28 tomsun28 merged commit 608cb05 into a2ap:main Nov 24, 2025
7 checks passed
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