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
[(develop)] fixed parseString when it trimming zero in the beggining #1549
Conversation
Thanks for bringing this up Viacheslav. I think to work out a solution for this we have to look a bit deeper. You're PR only checks for values with a single leading zero, like When you open a JSON document and it contains a string like On a side note: this issue has been addressed already in the successor of this library, |
Thinking about this more I think it would be proper to solve this in Can you add unit tests to verify that |
Thank you josdejong for quick response, regarding |
you are right, it is not so easy if such cases also need to be supported, will take a look if it possible to handle such cases |
I think it is only these two cases. |
@josdejong could you please review one more time? think it would be the safest way, to not break any other cases |
Ah, this regex looks solid indeed, thanks 👌 I see the linter complains about the semicolon |
@josdejong thank you. I fixed lint error. if it will be merged, just wandering, when are you planning to release new version? |
I'm publish the fix right away, there aren't other pending fixes/features right now. |
Published now in |
thank you very much, it is awesome news |
Hello,
I have a problem when I add new elements to an array, and even when I provide schema validation that only strings are allowed, JsonEditor always removes 0 in front of the number, after some investigation I found that
parseString
is casting values like 0102031234 to number and removes zero in front and making 102031234, that is absolutely wrong. (this number is actually example of CPR number in Denmark, it is like your passport number)Please, take into consideration my PR.
P.S. @josdejong great tool, thank you!