atiaomar1978-hub commented on code in PR #25495:
URL: https://github.com/apache/camel/pull/25495#discussion_r3917862635


##########
core/camel-api/src/main/java/org/apache/camel/spi/CamelEvent.java:
##########
@@ -94,6 +96,22 @@ enum Type {
 
     void setTimestamp(long timestamp);
 
+    /**
+     * Dumps the full event as a pretty-printed JSON string.
+     *
+     * @param  indent number of spaces to indent
+     * @return        JSON representation of this event
+     * @since         4.23
+     */
+    String toJSon(int indent);
+
+    /**
+     * The full event as a {@link Map} suitable for JSON serialization, 
containing structured metadata for this event.
+     *
+     * @since 4.23
+     */
+    Map<String, Object> asJSon();

Review Comment:
   Fixed in **6c7b7bc** — both methods are now `default` with a minimal 
`type`/`timestamp`/`message` fallback using `LinkedHashMap` and 
`StringQuoteHelper` (no extra dependency on `camel-util-json` from 
`camel-api`). Built-in events continue to override via `CamelEventJsonSupport` 
for the rich structured JSON.
   
   Also added the upgrade guide entry in `camel-4x-upgrade-guide-4_23.adoc`.
   
   _Composer on behalf of atiaomar1978-hub (AI-generated)_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to