Skip to content
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

text with "leading-zero" result in wrong value #10

Closed
EyesOnlyNet opened this issue May 17, 2017 · 10 comments
Closed

text with "leading-zero" result in wrong value #10

EyesOnlyNet opened this issue May 17, 2017 · 10 comments

Comments

@EyesOnlyNet
Copy link

Hi, i faced an issue regarding the conversion of "date" and "time" values with leading zeros.

Given:

<?xml version="1.0"?>
<date>02082017</date>

Result:

{
    "date": 2082017
}

Expected:

{
    "date": "02082017"
}

I need the original, unprocessed values of the XML. So my idea would be, to have an option like "preserveTextNodeValues": true or "convertTextNodeValues": false to skip the value conversion and keep the original string value.

@amitguptagwl
Copy link
Member

amitguptagwl commented May 17, 2017 via email

@EyesOnlyNet
Copy link
Author

EyesOnlyNet commented May 18, 2017

I've created a pull request for that (#11). Would be nice if you can check it. Maybe it is possible to handle that issue earlier with that.

@amitguptagwl
Copy link
Member

Thanks a lot for your valuable time to do the changes. But there is one more task need to run ie "bundle". It'll generate the bundled js for web use in lib folder.

Can you plz update that as well? I'm sorry to be dependent.

@EyesOnlyNet
Copy link
Author

It is done.
No sorry, if it is only that to proceed. 😃

@amitguptagwl
Copy link
Member

I have merged the changes. And updated the version. Let me see if I can publish it to npm using my mobile. Otherwise you'll have to update it via github.

Thanks for your effort and time.

*I hope to get laptop in next 2 weeks.

@EyesOnlyNet
Copy link
Author

Great, thank you very much.

@nidhi-tandon
Copy link

Is this issue resolved in latest npm update 2.4.3?

@amitguptagwl
Copy link
Member

amitguptagwl commented Jun 7, 2017 via email

@fidelsam1992
Copy link

This issue is not resolved yet ...
I tried on the latest NPM package 3.11.1
I also tried on the master branch

with this option set :
var options={
textNodeConversion:false
}

The output is still wrong

@amitguptagwl
Copy link
Member

amitguptagwl commented Jul 16, 2018

@fidelsam1992 This issue is very old. options name have been changed now. Can you please check README for correct option name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants