{"action":"opened","issue":{"url":"https://api.github.com/repos/evanplaice/jquery-csv/issues/44","labels_url":"https://api.github.com/repos/evanplaice/jquery-csv/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/evanplaice/jquery-csv/issues/44/comments","events_url":"https://api.github.com/repos/evanplaice/jquery-csv/issues/44/events","html_url":"https://github.com/evanplaice/jquery-csv/issues/44","id":105565902,"number":44,"title":"Hooks relying on a return value of false to skip entries makes parsing values that resolve to false impossible","user":{"login":"evanplaice","id":303159,"avatar_url":"https://avatars.githubusercontent.com/u/303159?v=3","gravatar_id":"","url":"https://api.github.com/users/evanplaice","html_url":"https://github.com/evanplaice","followers_url":"https://api.github.com/users/evanplaice/followers","following_url":"https://api.github.com/users/evanplaice/following{/other_user}","gists_url":"https://api.github.com/users/evanplaice/gists{/gist_id}","starred_url":"https://api.github.com/users/evanplaice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanplaice/subscriptions","organizations_url":"https://api.github.com/users/evanplaice/orgs","repos_url":"https://api.github.com/users/evanplaice/repos","events_url":"https://api.github.com/users/evanplaice/events{/privacy}","received_events_url":"https://api.github.com/users/evanplaice/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/evanplaice/jquery-csv/labels/2%E2%80%935%20stars","name":"2–5 stars","color":"FFFFFF"},{"url":"https://api.github.com/repos/evanplaice/jquery-csv/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/evanplaice/jquery-csv/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/evanplaice/jquery-csv/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/evanplaice/jquery-csv/milestones/1","html_url":"https://github.com/evanplaice/jquery-csv/milestones/backlog","labels_url":"https://api.github.com/repos/evanplaice/jquery-csv/milestones/1/labels","id":1297405,"number":1,"title":"backlog","description":null,"creator":{"login":"evanplaice","id":303159,"avatar_url":"https://avatars.githubusercontent.com/u/303159?v=3","gravatar_id":"","url":"https://api.github.com/users/evanplaice","html_url":"https://github.com/evanplaice","followers_url":"https://api.github.com/users/evanplaice/followers","following_url":"https://api.github.com/users/evanplaice/following{/other_user}","gists_url":"https://api.github.com/users/evanplaice/gists{/gist_id}","starred_url":"https://api.github.com/users/evanplaice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanplaice/subscriptions","organizations_url":"https://api.github.com/users/evanplaice/orgs","repos_url":"https://api.github.com/users/evanplaice/repos","events_url":"https://api.github.com/users/evanplaice/events{/privacy}","received_events_url":"https://api.github.com/users/evanplaice/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":26,"state":"open","created_at":"2015-09-09T09:45:31Z","updated_at":"2015-09-09T10:08:54Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-09-09T10:08:54Z","updated_at":"2015-09-09T10:08:54Z","closed_at":null,"body":"_From [whitesid...@gmail.com](https://code.google.com/u/100280409129115165759/) on August 11, 2014 07:06:16_\n\nThe onParseEntry callback function provides plenty of scope to parse entries to numerical values, Booleans, convert special cases to other values, etc, but since it always skips a value when a hook to boolean false, you cannot use it to handle values that parse to boolean false. \r\n\r\nRepro example:\r\n\r\nvar ParseBool = function (value)\r\n{\r\n  if (value == \"true\")\r\n  {\r\n    return true;\r\n  }\r\n  else if (value == \"false\")\r\n  {\r\n    return false;\r\n  }\r\n  else\r\n  {\r\n    return value;\r\n  }\r\n}\r\n\r\nvar contentCSV = \"index,isAwesome\\n0,true\\n,1,false\";\r\nvar data = $csv.toObjects (contentCSV, {onParseValue : ParseBool});\r\n\r\nThis will produce a JSON array with two objects of structure { index : someIntString, isAwesome : someBool }, one which looks like {index : \"0\", isAwesome : true } and one that looks like {index : \"1\", isAwesome : 0 }.\r\n\r\nIt would be better is the library used undefined to decide when to skip a value, or simply didn't have a skip-value check when parsing values, as it makes less sense to skip parsing specific values than it does to skip entire entries, for example. I've commented out the if hook !=== false line at 474 of the source (in the endOfValue function of parseEntry) and it gives no detrimental effects.\n\n_Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=43_"}}