Skip to content

Commit 179fbd2

Browse files
committed
[AG] update package details
1 parent 79abaa5 commit 179fbd2

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ var tObj = parser.getTraversalObj(xmlData,options);
151151
var jsonObj = parser.convertToJson(tObj,options);
152152

153153
```
154-
You can pass `true` or validation option as 3rd parameter to validate along with parsing which is same as above example.
154+
As you can notice in above code, validator is not embeded with in the parser and expected to be called separately. However, you can pass `true` or validation options as 3rd parameter to the parser to trigger validator internally. It is same as above example.
155155

156156
```js
157157
try{
@@ -161,6 +161,18 @@ try{
161161
}
162162
```
163163

164+
Validator reurns the following object in case of error;
165+
```js
166+
{
167+
err: {
168+
code: code,
169+
msg: message,
170+
line: lineNumber,
171+
},
172+
};
173+
```
174+
175+
164176
#### Note: [he](https://www.npmjs.com/package/he) library is used in this example
165177

166178
<details>

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
3.15.0 / 2019-11-23
2+
* validaor: improve error messaging
3+
* validator: add line number in case of error
4+
* validator: add more error scenarios to make it more descriptive
5+
16
3.14.0 / 2019-10-25
27
* arrayMode for XML to JS obj parsing
38

package-lock.json

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fast-xml-parser",
3-
"version": "3.14.0",
3+
"version": "3.15.0",
44
"description": "Validate XML or Parse XML to JS/JSON very fast without C/C++ based libraries",
55
"main": "./src/parser.js",
66
"scripts": {

0 commit comments

Comments
 (0)