Skip to content

Commit a035f51

Browse files
committed
Improve readme, add example for xml to json and vice versa.
1 parent aa8b4e0 commit a035f51

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,20 @@ U.formatJson("{\"a\":{\"b\":\"data\"}}");
8787
// "b": "data"
8888
// }
8989
// }
90+
91+
U.xmlToJson("<a><b>data</b></a>");
92+
// {
93+
// "a": {
94+
// "b": "data"
95+
// },
96+
// "#omit-xml-declaration": "yes"
97+
// }
98+
99+
U.jsonToXml("{\"a\":{\"b\":\"data\"}}");
100+
// <?xml version="1.0" encoding="UTF-8"?>
101+
// <a>
102+
// <b>data</b>
103+
// </a>
90104
```
91105

92106
Underscore-java is a java port of [Underscore.js](http://underscorejs.org/).

0 commit comments

Comments
 (0)