Comments (8)
I encountered the same issue. I have some Amazon product IDs that start with a 0. Even if they are non-integer values (e.g. 087483774X), they seem to be interpreted as integers.
from mr-data-converter.
FYI I fixed this issue in my fork. Here's the fix:
isNumber: function(string) {
return (!(string==='' || isNaN(+string) || /^0\d+/.test(string)));
},
from mr-data-converter.
@thdoan I tried your version and I have some data that has a value of 0 and it's not wrapping the 0 with quotes for me.
from mr-data-converter.
@CodeAbuser can you give me sample data that shows the issue by submitting a new issue in my fork? Thanks.
from mr-data-converter.
Thought I would chime in on this. I used your build, and it fixed a ton of
issues that I was having to clean up regular expressions after the
conversion. But it create a new one.
Some of my data is optional (that is empty) in excel. Where I was
previously getting null in the json, now I am getting a empty string
(""). Not sure what the expected behavior should be.
On Tue, Apr 5, 2016 at 9:21 PM, Tom Doan [email protected] wrote:
@CodeAbuser https://github.com/CodeAbuser can you give me sample data
that shows the issue please?—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#32 (comment)
from mr-data-converter.
@stalsma can you provide a small data sample I can test with and what to expect? I haven't touched the code in awhile, but from my recollection whether it returns null or "" depends on the existing data in the column. For example, if the column contains strings or a mix of strings and numbers, then an empty cell would output an empty string; if a column contains only numbers, then an empty cell would output null. I may add an option to force it to "" or null if that's helpful.
Also, please report bugs/feature requests in my fork. Thanks.
from mr-data-converter.
@thdoan Here is the raw input (corresponding Excel attached--b/c the formatting w/the tabs will get lost).
id ebookISBN hardcoverISBN paperbackISBN cdISBN
737 978-1-939160-80-5 978-1-939160-73-7
Both the hardcover and cd ISBNs are converted to empty strings instead of nulls.
[{"id":737,"ebookISBN":"978-1-939160-80-5","hardcoverISBN":"","paperbackISBN":"978-1-939160-73-7","cdISBN":""}]
I agree that this is a preference sort of thing, and "" could be a correct interpretation of the data (as is null).
BTW, I tried attaching directly to your fork, but there wasn't an issues tab....
from mr-data-converter.
@stalsma I have reverted the tool to set null value instead of empty string for empty cells in int/float columns.
from mr-data-converter.
Related Issues (20)
- TRUE/FALSE should be booleans not strings HOT 1
- Mr. Data Coverter not recognizing excel text as text HOT 2
- Feature request: Convert JSON data back to an Excel-friendly format HOT 1
- Strings with amperstands lose spacing HOT 1
- SQL mode doesn't escape single quotes
- Unmatched double-quotes causes Chrome to hang
- Option for empty string instead of null
- URLs are not quoted HOT 2
- escaping as an option
- Output invalid when data has double quotes HOT 3
- Feature request: delete properties with null values
- Parse CSV with objects and arrays
- page hangs if manually typing CSV with a leading "
- BUG on 5th colum HOT 1
- Please, include python list
- sep=; separator
- the converter cannot convert the excel right which key is the first col
- Fail to recognize string and produce invalid JSON
- Repository no longer maintained - Alternatives to Mr data converter HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mr-data-converter.