encodeArgsUnsafe
Encodes the given arguments into a JSON representation without type safety checks.
This method attempts to cast the arguments to the expected type and uses the configured serializer for the actual encoding. Use caution when calling this method, as bypassing type safety may lead to runtime exceptions if the cast is invalid.
Return
A JsonObject representing the encoded arguments.
Parameters
args
The input arguments to be encoded. These are provided as a generic Any? type and are internally cast to the expected type.
Throws
If the provided arguments cannot be cast to the expected type.