Closed monicasenapati closed 6 years ago
We don't do anything to round any values, it must be somewhere else. If you can create a reproduction, e.g. a failing test or a sample data set and commands, I can help look into any issues.
I am converting Tweets.json to Tweets.csv.
As you can see, the ones in the ID column are rounded up. I was wondering a work around this issue, since I need the exact IDs.
Thanks & regards,
Monica
From: Ilya Radchenko notifications@github.com Sent: 24 October 2016 12:35:46 To: zemirco/json2csv Cc: Senapati, Monica (UMKC-Student); Author Subject: Re: [zemirco/json2csv] Data trimmed issue (#149)
We don't do anything to round any values, it must be somewhere else. If you can create a reproduction, i.e. a failing test, I can help look into any issues.
You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/zemirco/json2csv/issues/149#issuecomment-255826781, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUVUmSpek3v346B2sZOMnMrAb8DRC8diks5q3PqCgaJpZM4KfHlG.
Can you post a subset of that data and the commands you ran, so I can test it?
That's not a problem with this library.
740245381351497730
is larger and the largest safest integer in javascript. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)
You can just try the code bellow:
const test = 740245381351497730;
if (test === 740245381351497700) {
console.log('Trimmed');
} else {
console.log('Not Trimmed');
}
When I change a json file to csv, in one of the columns, the integer gets rounded up. For example,an ID 740245381351497730 is displayed as 740245381351497700. Is there any work around this problem?