creating a custom extension object implementing CloudEventExtension, when using the extension (customExt) as below, and then serializing the CloudEvent, the serialization for the CloudEvent is failing with JsonMappingException.
CloudEventBuilder.v1()
.withSource(URI.create(source))
.withType(event_type)
.withTime(event_time)
.withId(event.getEventId())
.withDataContentType(contentType)
.withData(eventPayaload)
.withDataSchema(URI.create(XDM_SCHEMA_URI))
.withExtension(DATA_SCHEMA_VERSION_KEY_EXTENSION_NAME, schemaVerExt)
.withExtension(X_ACTION_ID_KEY_EXTENSION_NAME, requestIdExt)
.withExtension(customExt);
here is how the extension looks like. The customExt is the Recipient object

Also, if using the other supported methods withExtension (with key, value) as below, I had to send the string version of the customExt, and then if serialized the output is not in the expected format (see below). It can break our customers event
integrations. Kindly suggest.

expected serialized CloudEvent custom extension
"recipient":{"userid":"9CE048DB5E8F485XXXXXXXXX@AdobeOrg"}
actual serialized CloudEvent custom extension
"recipient":"{\"userid\":\"9CE048DB5E8F485XXXXXXXXX@AdobeOrg\"}"
The serialization is failing while reading extensions here, as I believe the Object type value is not supported.
creating a custom extension object implementing
CloudEventExtension, when using the extension (customExt) as below, and then serializing the CloudEvent, the serialization for the CloudEvent is failing with JsonMappingException.here is how the extension looks like. The

customExtis theRecipientobjectAlso, if using the other supported methods
withExtension(with key, value) as below, I had to send the string version of the customExt, and then if serialized the output is not in the expected format (see below). It can break our customers eventintegrations. Kindly suggest.
expected serialized CloudEvent custom extension
actual serialized CloudEvent custom extension
The serialization is failing while reading extensions here, as I believe the
Objecttypevalueis not supported.