Keep a numeric value distinct from a quoted value
Example input
{"quantity":2,"code":"02"}Expected result
quantity → number
code → stringConvert the sample to typed XML and inspect the type markers for quantity and code. The numeric quantity remains a number, while the product code retains its leading zero as a string. Decode that generated XML to confirm the restored JSON has the same distinction. Agree on the XML structure with a receiving system before using it as an interchange format.