oscerd commented on PR #28957:
URL: https://github.com/apache/camel/pull/28957#issuecomment-6588406423

   Thanks Claus, confirmed: the default `JsonOptions` of azure-json accept 
`NaN` and `Infinity`, so `{"v": NaN}` passed the check and went out as raw 
`NaN` in `data`, which a strict parser rejects. `isJsonObjectOrArray` now reads 
with `new JsonOptions().setNonNumericNumbersSupported(false)`, so such text is 
sent as a JSON string like other text. The new 
`textWithNonNumericNumbersIsSentAsJsonString` covers `{"v": NaN}` and `[1, 
-Infinity]` and fails without the change. The test helper now reads the 
published JSON with the same strict options, so a non-numeric number on the 
wire fails any test. Comments, trailing commas and single quotes were already 
rejected, as JSONC is off by default.
   
   _Claude Code on behalf of Andrea Cosentino (oscerd)_
   


-- 
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