json-xml
v1.0.9
Published
turn json to xml and xml to json
Downloads
209
Readme
json-xml
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' } } }