{"action":"opened","issue":{"url":"https://api.github.com/repos/kauegimenes/jsonexport/issues/21","repository_url":"https://api.github.com/repos/kauegimenes/jsonexport","labels_url":"https://api.github.com/repos/kauegimenes/jsonexport/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/kauegimenes/jsonexport/issues/21/comments","events_url":"https://api.github.com/repos/kauegimenes/jsonexport/issues/21/events","html_url":"https://github.com/kauegimenes/jsonexport/issues/21","id":218004906,"number":21,"title":"Inconsistencies with newlines","user":{"login":"mwang25277","id":13982474,"avatar_url":"https://avatars1.githubusercontent.com/u/13982474?v=3","gravatar_id":"","url":"https://api.github.com/users/mwang25277","html_url":"https://github.com/mwang25277","followers_url":"https://api.github.com/users/mwang25277/followers","following_url":"https://api.github.com/users/mwang25277/following{/other_user}","gists_url":"https://api.github.com/users/mwang25277/gists{/gist_id}","starred_url":"https://api.github.com/users/mwang25277/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwang25277/subscriptions","organizations_url":"https://api.github.com/users/mwang25277/orgs","repos_url":"https://api.github.com/users/mwang25277/repos","events_url":"https://api.github.com/users/mwang25277/events{/privacy}","received_events_url":"https://api.github.com/users/mwang25277/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-29T20:49:48Z","updated_at":"2017-03-29T20:49:48Z","closed_at":null,"body":"\r\n[wangm13-tweets.zip](https://github.com/kauegimenes/jsonexport/files/880322/wangm13-tweets.zip)\r\n\r\nAttached is a csv file generated using jsonexport to convert Twitter data (100 tweets) from the Streaming API (in JSON) to the given csv file. \r\n\r\n      `twitStream.on('tweet', function(tweet) {\r\n\t\tcounter++;\r\n\t\ttweets.push(tweet);\r\n\t\tif(counter == count) {\r\n\t\t\ttwitStream.stop();\r\n\t\t\tvar parsedTweets = [];\r\n\t\t\tfor(aTweet in tweets) {\r\n\t\t\t\tvar parsed = {\r\n\t\t\t\t\tcreated_at: tweets[aTweet].created_at,\r\n\t\t\t\t\tid: tweets[aTweet].id,\r\n\t\t\t\t\ttext: tweets[aTweet].text,\r\n\t\t\t\t\tuser_id: tweets[aTweet].user.id,\r\n\t\t\t\t\tuser_name: tweets[aTweet].user.name,\r\n\t\t\t\t\tuser_screen_name: tweets[aTweet].user.screen_name,\r\n\t\t\t\t\tuser_location: tweets[aTweet].user.location,\r\n\t\t\t\t\tuser_followers_count: tweets[aTweet].user.followers_count,\r\n\t\t\t\t\tuser_friends_count: tweets[aTweet].user.friends_count,\r\n\t\t\t\t\tuser_created_at: tweets[aTweet].user.created_at,\r\n\t\t\t\t\tuser_time_zone: tweets[aTweet].user.time_zone,\r\n\t\t\t\t\tuser_profile_background_color: tweets[aTweet].user.profile_background_color,\r\n\t\t\t\t\tuser_profile_image_url: tweets[aTweet].user.profile_image_url,\r\n\t\t\t\t\tgeo: tweets[aTweet].geo,\r\n\t\t\t\t\tcoordinates: tweets[aTweet].coordinates,\r\n\t\t\t\t\tplace: tweets[aTweet].place\r\n\t\t\t\t}\r\n\t\t\t\tparsedTweets.push(parsed);\r\n\t\t\t}\r\n\r\n\t\t\t//https://www.npmjs.com/package/jsonexport\r\n\t\t\tjsonexport(parsedTweets, function(err, csv) {\r\n\t\t\t   if(err) return console.log(err);\r\n\t\t\t\tfs.writeFile(\"wangm13-tweets.csv\", csv);\r\n\t\t\t});\t\t\t\r\n\t\t\tres.send(tweets);\r\n\t\t}\r\n\t});`\r\n\r\nIn the csv file, some of the text fields with newlines are correctly surrounded with quotes (for example on line 46: \"RT @LToddWood: Judge Napolitano Returns On Fox News, Stands By Claim Brits Spied On Trump\r\n\r\nhttps://t.co/Bumb2HG8eI\"). However, some are not.\r\n\r\nExamples:\r\n\r\n**Line 6**\r\nRT @TLBJames: This is EXACTLY the bigoted-GOP-emboldening I knew Trump's coup-by-EC-victory would cause.\r\n\r\nAnd EXACTLY why we're g…  \r\n\r\n**Line 35**\r\nPlease stop this. \r\n\r\ncc @SenMarkey @SenWarren @RepKClark https://t.co/LStc6p6TmW"}}
{"actor":{"display_login":"mwang25277"}}