Automatic string to int convertion issue in WSO2MI4.1
Description
I am getting issue to automatic String to int conversion in WSO2MI4.1 and when i search about this then found below fix but not in MI but wso2ei https://github.com/wso2/product-ei/issues/4364
As per the solution they asked to add below property in synapse.config
# Disable auto conversion of strings to primitives
synapse.commons.json.json.output.autoPrimitive=false
But in WSO2MI synapse.config wont support this property.
How we can resolve this issue in WSO2MI?
Affected Component
MI
Version
4.0.1
Environment Details (with versions)
Rockey Linux
Related Issues
https://github.com/wso2/product-ei/issues/4364
Suggested Labels
wso2mi
Error Details
2023-03-27T10:42:35.952Z ERROR | Error parsing date '20230331132434': TypeError: invokeMember (parse) on java.text.SimpleDateFormat failed due to: no applicable overload found (overloads: [Method[public java.util.Date java.text.SimpleDateFormat.parse(java.lang.String,java.text.ParsePosition)], Method[public java.util.Date java.text.DateFormat.parse(java.lang.String) throws java.text.ParseException]], arguments: [2.0230331132434E13 (Double)]) | script=read_order_adapter module=orderhub-order-management user=doc-norc.admin oaddr=10.0.4.183 addr=10.0.1.250 prot=HTTP/1.1 prod=orderhub act=read objtype=order objid=21 status=ok
Anyone can please help ?
You can enable/disable converting string to primitive types in the JSON output in XML to JSON transformations by setting the following configuration in $MI_HOME/conf/deployment.toml
[mediation]
synapse.enable_auto_primitive = false