davsclaus commented on PR #28457: URL: https://github.com/apache/camel/pull/28457#issuecomment-6417280346
One more update (3c99cc8c2632): the strict mode is now **on by default** in a payload mode, as the safety belt of the mode. A user who sets `payloadMode=json` says the payload is JSON, and passing a CSV file or broken JSON on only moves the error to a confusing place three steps later. - The check is where the exchange comes into Camel and gets its payload mode; a route whose consumer is `direct` or `seda` is not checked again, so a utility route that gets XML from a json caller does not fail. - A null or empty body passes (timer, http `GET`, Kafka tombstone), and so does a JSON scalar (`123`, `"text"`, `true`), which is valid JSON. - A route whose input is not (only) JSON sets `payloadMode=default` (later `text`), or `payloadModeStrict=false`; `camel.main.payloadModeStrict=false` turns it off for all routes. The mode is new, so no existing route fails. _Claude Code on behalf of davsclaus_ -- 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]
