Paste on the left; conversion happens as you type.
How the mapping works. Attributes become @name keys, text inside an element that also has attributes or children becomes #text, repeated sibling elements become arrays, and elements with nothing inside become empty strings. Namespaces are kept as part of the tag name. Comments and processing instructions are dropped when converting to JSON (but preserved by Format XML). Because JSON has no attribute concept, XML → JSON → XML is lossless only when you keep the @/#text conventions.