You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var convert = require('xml-js');
var json = require('fs').readFileSync('test.json', 'utf8');
var options = {compact: true, ignoreComment: true, spaces: 4};
var result = convert.json2xml(json, options);
console.log(result);
Here is test.json file
{
"value": [
{
"_text": "\"test < \""
}
]
}
Result: <value>"test < "</value>
Expect: <value>"test < "</value>
Is there any way to ignore auto convert < to <
The text was updated successfully, but these errors were encountered:
I'm using json2xml
Here is test.json file
Result:
<value>"test < "</value>
Expect:
<value>"test < "</value>
Is there any way to ignore auto convert < to <
The text was updated successfully, but these errors were encountered: