{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/3593","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/3593/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/3593/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/3593/events","html_url":"https://github.com/aspnet/Mvc/issues/3593","id":118092823,"number":3593,"title":"ModelMetadata.ConvertEmptyStringToNull meaning in codebase","user":{"login":"Muchiachio","id":6647444,"avatar_url":"https://avatars.githubusercontent.com/u/6647444?v=3","gravatar_id":"","url":"https://api.github.com/users/Muchiachio","html_url":"https://github.com/Muchiachio","followers_url":"https://api.github.com/users/Muchiachio/followers","following_url":"https://api.github.com/users/Muchiachio/following{/other_user}","gists_url":"https://api.github.com/users/Muchiachio/gists{/gist_id}","starred_url":"https://api.github.com/users/Muchiachio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Muchiachio/subscriptions","organizations_url":"https://api.github.com/users/Muchiachio/orgs","repos_url":"https://api.github.com/users/Muchiachio/repos","events_url":"https://api.github.com/users/Muchiachio/events{/privacy}","received_events_url":"https://api.github.com/users/Muchiachio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-20T17:58:44Z","updated_at":"2015-11-20T20:04:54Z","closed_at":null,"body":"Hi, I saw that [simple type model binder](https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNet.Mvc.Core/ModelBinding/SimpleTypeModelBinder.cs#L39) use `ModelMetadata.ConvertEmptyStringToNull` to null out empty **and white space** string values, like this:\r\n```C#\r\nif (bindingContext.ModelMetadata.ConvertEmptyStringToNull &&\r\n    string.IsNullOrWhiteSpace(modelAsString))\r\n{\r\n    model = null;\r\n}\r\n```\r\n\r\nIs using `string.IsNullOrWhiteSpace(modelAsString)` correct here?\r\nBecause MVC5 nulls out empty values too, but strings containing only white space are left in tact."},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/158510930","html_url":"https://github.com/aspnet/Mvc/issues/3593#issuecomment-158510930","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/3593","id":158510930,"user":{"login":"dougbu","id":6431421,"avatar_url":"https://avatars.githubusercontent.com/u/6431421?v=3","gravatar_id":"","url":"https://api.github.com/users/dougbu","html_url":"https://github.com/dougbu","followers_url":"https://api.github.com/users/dougbu/followers","following_url":"https://api.github.com/users/dougbu/following{/other_user}","gists_url":"https://api.github.com/users/dougbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dougbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougbu/subscriptions","organizations_url":"https://api.github.com/users/dougbu/orgs","repos_url":"https://api.github.com/users/dougbu/repos","events_url":"https://api.github.com/users/dougbu/events{/privacy}","received_events_url":"https://api.github.com/users/dougbu/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T20:04:53Z","updated_at":"2015-11-20T20:04:53Z","body":"/cc @pranavkm this `IsNullOrWhiteSpace()` came in when you initially ported over model binding (see #20). Wasn't talked about at all in the PR discussion.\r\n\r\nWas there a reason to start converting whitespace? If not, this is a breaking change we should revert."}}