XML → JSON parses well-formed XML locally (attributes as @name keys, text of mixed elements as #text, repeated siblings as arrays, empty elements as null; comments and processing instructions dropped; CDATA kept verbatim). Only the five predefined entities and numeric character references are decoded; DOCTYPE internal subsets are rejected, so no entity expansion. JSON → XML reverses the same mapping (@keys → attributes, #text → text, arrays → repeated elements, a single non-array top-level key becomes the root, otherwise a wrapper root). Limits: 256 levels, 200,000 elements.
prefix keeps them as @name keys; ignore drops them.
auto: only repeated siblings; always: every child list is an array.
infer turns safe numbers and true/false into JSON types.
Used when the JSON has no single top-level key.