import { toXML } from "https://esm.sh/jstoxml@3.2.5?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 821 days ago
import { toXML } from "https://esm.sh/jstoxml@3.2.5"
// 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 821 days ago