The file module refers to the "XSLT and XQuery Serialization 3.0" spec. If that is taken literally, it cannot write arrays or maps of 3.1
And the serialize function was extended to allow map {...} serialization params, file:write and file:append should probably allow them to.
And writing map/arrays as JSON is a common task, there should probably be file:write-json, file:append-json functions that are like write/append with default map {"method": "json"} options
The file module refers to the "XSLT and XQuery Serialization 3.0" spec. If that is taken literally, it cannot write arrays or maps of 3.1
And the serialize function was extended to allow
map {...}serialization params,file:writeandfile:appendshould probably allow them to.And writing map/arrays as JSON is a common task, there should probably be
file:write-json,file:append-jsonfunctions that are like write/append with defaultmap {"method": "json"}options