import { toXML } from "https://esm.sh/[email protected]?target=deno";
// For example JSON objects, have a look at https://github.com/davidcalhoun/jstoxml
export async function main(json: object | string, indent?: string, header?: boolean | string, selfCloseTags: boolean) {
if (typeof json === 'string') {
json = JSON.parse(json);
}
return toXML(json, {
indent,
header,
selfCloseTags,
});
} Submitted by jaller94 1196 days ago
import { toXML } from "https://esm.sh/[email protected]"
// For example JSON objects, have a look at https://github.com/davidcalhoun/jstoxml
export async function main(json: object | string, indent?: string, header?: boolean | string, selfCloseTags: boolean) {
if (typeof json === 'string') {
json = JSON.parse(json);
}
return toXML(json, {
indent,
header,
selfCloseTags,
})
} Submitted by jaller94 1197 days ago