json-xml

turn json to xml and xml to json

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
json-xml
101.0.95 years ago5 years agoMinified + gzip package size for json-xml in KB

Readme

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