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
Leading numeric zeros in JSON format #1293
Comments
Same issue apples to values like |
Actually the problem is wider. How a value is considered as number or string during JSON conversion? What if a value has been explicitly quoted, why it is still converted to number? For example value |
Hi, I have used this sample input
and if I run
I'm using |
There are two different things. For JSON -- For CSV -- double-quotes are there for delimiters -- to allow people to put embedded commas and/or newlines into cells. The Go CSV-parser library I'm using doesn't return back to the caller information about whether a field was quoted. However, I've already forked and hacked on it a bit; I can look into trying to get back a was-quoted flag from the parser ... |
Meanwhile please also check out |
I'm converting CSV to JSON and values like "0012AS4" are presented like
{"Key": "0012AS4"}
.But if the values is like "0123456789" it is presented in JSON output like
{"Key": 0123456789 }
. Which makes invalid JSON produced.The text was updated successfully, but these errors were encountered: