Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 67c6496

Browse files
committed
improves documentation
1 parent 6983c81 commit 67c6496

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ npm install xml2json
1616
var parser = require('xml2json');
1717

1818
var xml = "<foo>bar</foo>";
19-
var json = parser.toJson(xml); //returns an string by default
19+
var json = parser.toJson(xml); //returns an string containing the json structure by default
2020
console.log(json);
2121
```
22-
if you want to get the Javascript object then you might want to invoke parser.toJson(xml, true);
22+
* if you want to get the Javascript object then you might want to invoke parser.toJson(xml, {object: true});
23+
* if you want a reversible json to xml then you should use parser.toJson(xml, {reversible: true});
2324

2425

2526
## License

0 commit comments

Comments
 (0)