Class JSONParseError_v0_3

All Implemented Interfaces:
Serializable, A2AError_v0_3, Event_v0_3

public class JSONParseError_v0_3 extends JSONRPCError_v0_3 implements A2AError_v0_3
JSON-RPC error indicating that the server received invalid JSON that could not be parsed.

This error is returned when the request payload is not valid JSON, such as malformed syntax, unexpected tokens, or encoding issues. This is distinct from InvalidRequestError_v0_3, which indicates structurally valid JSON that doesn't conform to the JSON-RPC specification.

Corresponds to JSON-RPC 2.0 error code -32700.

Usage example:

try {
    objectMapper.readValue(payload, JSONRPCRequest.class);
} catch (org.a2aproject.sdk.compat03.json.JsonProcessingException e) {
    throw new JSONParseError("Malformed JSON: " + e.getMessage());
}
See Also:
  • Field Details

    • DEFAULT_CODE

      public static final Integer DEFAULT_CODE
  • Constructor Details

    • JSONParseError_v0_3

      public JSONParseError_v0_3()
    • JSONParseError_v0_3

      public JSONParseError_v0_3(String message)
    • JSONParseError_v0_3

      public JSONParseError_v0_3(Integer code, String message, Object data)