json-xml

1.0.9 • Public • Published

json-xml

npm version

turn json to xml and xml to json

Install:

npm install json-xml

Usage Example:

const {toXml, toJson} = require('json-xml');
const json = {
    person: {
        name: {
            first: 'john',
            last: 'doe'
        }
    }
};
const xml = toXml(json);
const jsonAgain = toJson(xml);

Output - xml

<person>
<name>
<first>
john
</first>
<last>
doe
</last>
</name>
</person>

Output - json

{ person: { name: { first: 'john', last: 'doe' } } }

/json-xml/

    Package Sidebar

    Install

    npm i json-xml

    Weekly Downloads

    54

    Version

    1.0.9

    License

    MIT

    Last publish

    Collaborators

    • avi.n.y