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' } } }

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.9
    28
    • latest

Version History

Package Sidebar

Install

npm i json-xml

Weekly Downloads

36

Version

1.0.9

License

MIT

Last publish

Collaborators

  • avi.n.y