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
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 Summary
ConstructorsConstructorDescriptionJsonProcessingException_v0_3(String message) Constructs a new JsonProcessingException with the specified message.JsonProcessingException_v0_3(String message, @Nullable Throwable cause) Constructs a new JsonProcessingException with the specified message and cause.Constructs a new JsonProcessingException with the specified cause. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JsonProcessingException_v0_3
Constructs a new JsonProcessingException with the specified message.- Parameters:
message- the detail message explaining the cause of the exception
-
JsonProcessingException_v0_3
-
JsonProcessingException_v0_3
Constructs a new JsonProcessingException with the specified cause.- Parameters:
cause- the underlying cause of the exception
-