Edits history of script submission #156 for ' JSON to XML (helper)'

  • deno
    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 1358 days ago

  • deno
    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 1359 days ago