While parsing an XML which has hexadecimal value which starts with number (0-9), for example below:
<color> <color_type>primary</color_type> <value>008E97</value> </color>
The equivalent json is formed is:
"color": [ { "color_type": "primary", "value": 8e+97 } ]
However, if the hexadecimal value starts with string, its equivalent json is also a string.
<color> <color_type>primary</color_type> <value>fc4c02</value> </color>
The equivalent json is formed is:
"color": [ { "color_type": "primary", "value": "fc4c02" } ]
The code fails to handle hexadecimal conversion and creates ambiguity by treating it as number and string both. I assume, if there is ambiguities like this, we need to stick to string rather than converting to number.