Class JsonProcessingException_v0_3

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.a2aproject.sdk.compat03.json.JsonProcessingException_v0_3
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JsonMappingException_v0_3

public class JsonProcessingException_v0_3 extends Exception
General exception for JSON processing errors during serialization or deserialization.

This exception serves as a replacement for Jackson's JsonProcessingException, allowing the A2A Java SDK to remain independent of any specific JSON library implementation. It can be used with any JSON processing library (Gson, Jackson, etc.).

This is the base class for more specific JSON processing exceptions like JsonMappingException_v0_3.

Usage example:

try {
    String json = gson.toJson(object);
} catch (Exception e) {
    throw new JsonProcessingException("Failed to serialize object", e);
}
See Also:
  • Constructor Details

    • JsonProcessingException_v0_3

      public JsonProcessingException_v0_3(String message)
      Constructs a new JsonProcessingException with the specified message.
      Parameters:
      message - the detail message explaining the cause of the exception
    • JsonProcessingException_v0_3

      public JsonProcessingException_v0_3(String message, @Nullable Throwable cause)
      Constructs a new JsonProcessingException with the specified message and cause.
      Parameters:
      message - the detail message explaining the cause of the exception
      cause - the underlying cause of the exception (may be null)
    • JsonProcessingException_v0_3

      public JsonProcessingException_v0_3(Throwable cause)
      Constructs a new JsonProcessingException with the specified cause.
      Parameters:
      cause - the underlying cause of the exception