===Adaptive Serialization===
In {{Version|Since BaseX 8.0}} of BaseX, {{Code|adaptive}} is the new default serialization method. It provides a textual representation for all XDM types, including maps and arrays, functions, attributes, and namespaces. All items will be separated using the value of the {{Code|item-separator}} parameter, or a newline if no value is specified:
<pre class="brush:xquery">
The new {{Code|json}} serialization output method can be used to serialize XQuery maps, arrays, atomic values and empty sequences as JSON.
{{Mark|Warning}}: The {{Code|json}} output method has been introduced in BaseX quite a while ago. With BaseX 8.0, the The implementation of this method has been rewritten to comply now complies with the new standard serialization rules and, at the same time, to preserve preserves the existing semantics:
* If an XML node of type {{Code|element(json)}} is found, it will be serialized following the serialization rules of the [[JSON Module]].