XML to JSON
Convert XML to JSON as you type: attributes become @ keys and repeated elements become arrays.
Set up for this job. It runs on JSON, YAML, TOML and XML converter, where every option is there to change.
Questions
How are attributes and text handled?
Attributes become keys that start with @. When an element has attributes and text, the text sits under #text.
When do I get an array?
An element that repeats under the same parent becomes an array. One that appears once becomes a single value, so the shape can change if the count changes.
Are numbers converted?
Text that looks like a number becomes a JSON number, except values with leading zeros such as 007, which stay strings.
Is my data uploaded?
No. It is converted in this tab. Nothing leaves your device.