{"action":"created","issue":{"url":"https://api.github.com/repos/NancyFx/Nancy/issues/1868","labels_url":"https://api.github.com/repos/NancyFx/Nancy/issues/1868/labels{/name}","comments_url":"https://api.github.com/repos/NancyFx/Nancy/issues/1868/comments","events_url":"https://api.github.com/repos/NancyFx/Nancy/issues/1868/events","html_url":"https://github.com/NancyFx/Nancy/issues/1868","id":61032167,"number":1868,"title":"Nancy testing Body.DeserializeJson<..> auto uppercases first character when deserialzing a dictionary","user":{"login":"PureKrome","id":899878,"avatar_url":"https://avatars.githubusercontent.com/u/899878?v=3","gravatar_id":"","url":"https://api.github.com/users/PureKrome","html_url":"https://github.com/PureKrome","followers_url":"https://api.github.com/users/PureKrome/followers","following_url":"https://api.github.com/users/PureKrome/following{/other_user}","gists_url":"https://api.github.com/users/PureKrome/gists{/gist_id}","starred_url":"https://api.github.com/users/PureKrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PureKrome/subscriptions","organizations_url":"https://api.github.com/users/PureKrome/orgs","repos_url":"https://api.github.com/users/PureKrome/repos","events_url":"https://api.github.com/users/PureKrome/events{/privacy}","received_events_url":"https://api.github.com/users/PureKrome/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-13T10:30:26Z","updated_at":"2015-03-13T11:03:24Z","closed_at":"2015-03-13T10:53:51Z","body":"Nancy.Testing allows us to test our results from a browser call. If the json result contains a dictionary (key/value) piece of data, it deserializes the json piece of data but _uppercases_ the first character of the **key** value in the key/value object.\r\n\r\nFor example.\r\n\r\ngiven this json result...\r\n\r\n```\r\n{\r\n  \"message\": \"Something bad happened.\",\r\n  \"errors\": {\r\n    \"notificationId\": \"blah blah blah\"\r\n  }\r\n}\r\n```\r\n\r\nand then this nancy testing code ...\r\n\r\n`var modelWithBadKey = result.Body.DeserializeJson<FakeData>();`\r\n\r\nthis assert fails..\r\n\r\n`modelWithBadKey.Errors.First().Key.ShouldBe(\"notificationId\");`\r\n\r\nthe value is (incorrectly) set as `NotificationId`. <-- notice the upper case, first character?\r\n\r\nDon't believe me: [I've made a _full_ repo](https://gist.github.com/PureKrome/7eed45a0f248b769675f) to prove it.\r\n\r\nSo, is this _by design_ ?"},"comment":{"url":"https://api.github.com/repos/NancyFx/Nancy/issues/comments/78919700","html_url":"https://github.com/NancyFx/Nancy/issues/1868#issuecomment-78919700","issue_url":"https://api.github.com/repos/NancyFx/Nancy/issues/1868","id":78919700,"user":{"login":"PureKrome","id":899878,"avatar_url":"https://avatars.githubusercontent.com/u/899878?v=3","gravatar_id":"","url":"https://api.github.com/users/PureKrome","html_url":"https://github.com/PureKrome","followers_url":"https://api.github.com/users/PureKrome/followers","following_url":"https://api.github.com/users/PureKrome/following{/other_user}","gists_url":"https://api.github.com/users/PureKrome/gists{/gist_id}","starred_url":"https://api.github.com/users/PureKrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PureKrome/subscriptions","organizations_url":"https://api.github.com/users/PureKrome/orgs","repos_url":"https://api.github.com/users/PureKrome/repos","events_url":"https://api.github.com/users/PureKrome/events{/privacy}","received_events_url":"https://api.github.com/users/PureKrome/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T11:03:24Z","updated_at":"2015-03-13T11:03:24Z","body":"But .. ok. now i'm confused :/\r\n\r\nYour fix worked -> it _retained_ the casing during the _deserialization_. \r\n\r\nSo are you saying that .. during _deserialization_ ... the key content should _not_ be altered at all and that `RetainCasing` value should _not_ be used at all during _deserialzation_ of dictionary keys? Because, right now .. it is. "}}