This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 4178cb39023a CAMEL-27097: Body types page - the application-json
example shows the bodies the transformer takes (#30728)
4178cb39023a is described below
commit 4178cb39023a52afd48061f8b8668e900965c05a
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Nov 24 19:48:14 2026 +0100
CAMEL-27097: Body types page - the application-json example shows the
bodies the transformer takes (#30728)
Since CAMEL-26300 the application-json transformer takes text, bytes, a
stream,
a Map, a List, a POJO or null, not any body. Show the current catalog entry,
shortened, and reword the sentence.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
docs/user-manual/modules/ROOT/pages/body-types.adoc | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/docs/user-manual/modules/ROOT/pages/body-types.adoc
b/docs/user-manual/modules/ROOT/pages/body-types.adoc
index 573cc57999af..5a8b790bbc67 100644
--- a/docs/user-manual/modules/ROOT/pages/body-types.adoc
+++ b/docs/user-manual/modules/ROOT/pages/body-types.adoc
@@ -229,12 +229,16 @@ it the body is as it was before the split:
=== Data type transformers
A data type transformer, which `transformDataType` runs for its `toType`, has
body types as well. `application-json`
-writes any object as JSON bytes, and the CloudEvent transformers of the
components only set headers:
+takes text, bytes, a stream, a Map, a List, a POJO or null, and writes Json
bytes. Text that is not a Json object or
+array becomes a Json string, and bytes and a stream are read as text. The
CloudEvent transformers of the components
+only set headers. The catalog entry of `application-json` (the descriptions
shortened):
[source,json]
----
-"transformerIn": { "carriers": [ "any" ] },
-"transformerOut": { "carriers": [ "bytes" ], "javaType": "byte[]", "format":
"json" }
+"transformerIn": { "carriers": [ "text", "bytes", "stream", "map", "list",
"pojo", "null" ],
+ "description": "A Json object or array as text, bytes or a stream, a Map, a
List, a JsonNode or a POJO; other text ... becomes a Json string ..." },
+"transformerOut": { "carriers": [ "bytes" ], "javaType": "byte[]", "format":
"json",
+ "description": "Json as bytes, with the Content-Type application/json, or
the +json media type the message had ..." }
----
`transformDataType` takes its body from them, by the name of its `toType`:
`aws2-s3:application-cloudevents` is the