-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json to xml: Auto convert < to < #209
Comments
The The follow code can help you: const res = convert.json2xml(
JSON.stringify({
value: [
{
_text: '"test < "',
},
],
}),
{
compact: true,
textFn: (value) => {
return value.replace("<", "<");
},
}
);
// <value>"test < "</value>
console.log(res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: