Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/javadev/xml-to-json
Xml to json javascript library.
https://github.com/javadev/xml-to-json
javascript json json-to-xml xml xml-json-converter xml-to-json
Last synced: 2 months ago
JSON representation
Xml to json javascript library.
- Host: GitHub
- URL: https://github.com/javadev/xml-to-json
- Owner: javadev
- License: mit
- Created: 2018-10-05T12:26:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T05:49:32.000Z (over 1 year ago)
- Last Synced: 2024-08-10T06:48:27.977Z (6 months ago)
- Topics: javascript, json, json-to-xml, xml, xml-json-converter, xml-to-json
- Homepage: https://xmltojson.github.io
- Size: 1.04 MB
- Stars: 13
- Watchers: 4
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
xml-to-json
===========Utility for converting between XML and JSON formats, with the added ability to prettify both XML and JSON strings.
### Usage
```javascript
var json = xmlToJson("");// {
// "a": {
// "-self-closing": "true"
// },
// "#omit-xml-declaration": "yes"
// }var prettyXml = formatXml("");
//
//
//var xml = jsonToXml("{}");
//
//var xml = jsonToXml("{}", "myroot");
//
//var prettyJson = formatJson('{"a":{"b":true}}');
// {
// "a": {
// "b": true
// }
// }
```