XML 转 JSON
将 XML 转换为 JSON,妥善处理属性和重复元素。
输入
结果
使用方法
Converting XML to JSON
Press Convert to obtain a JSON representation. Attributes use the at sign prefix.
- Paste XML into the input editor.
- Press Convert.
- Copy the JSON output.
常见问题
How are attributes represented?
Each attribute becomes a property named with an at sign, for example at id.
How are repeated elements handled?
When the same tag appears more than once at one level the values are collected into an array.