{"action":"created","issue":{"url":"https://api.github.com/repos/netresearch/jsonmapper/issues/30","labels_url":"https://api.github.com/repos/netresearch/jsonmapper/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/netresearch/jsonmapper/issues/30/comments","events_url":"https://api.github.com/repos/netresearch/jsonmapper/issues/30/events","html_url":"https://github.com/netresearch/jsonmapper/pull/30","id":65255072,"number":30,"title":"Changing atomatic setter method name guessing to fully convert to camel case.","user":{"login":"mateusrevoredo","id":1175432,"avatar_url":"https://avatars.githubusercontent.com/u/1175432?v=3","gravatar_id":"","url":"https://api.github.com/users/mateusrevoredo","html_url":"https://github.com/mateusrevoredo","followers_url":"https://api.github.com/users/mateusrevoredo/followers","following_url":"https://api.github.com/users/mateusrevoredo/following{/other_user}","gists_url":"https://api.github.com/users/mateusrevoredo/gists{/gist_id}","starred_url":"https://api.github.com/users/mateusrevoredo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateusrevoredo/subscriptions","organizations_url":"https://api.github.com/users/mateusrevoredo/orgs","repos_url":"https://api.github.com/users/mateusrevoredo/repos","events_url":"https://api.github.com/users/mateusrevoredo/events{/privacy}","received_events_url":"https://api.github.com/users/mateusrevoredo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-30T16:59:16Z","updated_at":"2015-03-31T12:34:53Z","closed_at":"2015-03-31T06:36:05Z","pull_request":{"url":"https://api.github.com/repos/netresearch/jsonmapper/pulls/30","html_url":"https://github.com/netresearch/jsonmapper/pull/30","diff_url":"https://github.com/netresearch/jsonmapper/pull/30.diff","patch_url":"https://github.com/netresearch/jsonmapper/pull/30.patch"},"body":"Changing the way library was looking for setter methods. \r\nPreviously it was concatenating 'set' with ucfirst($name). This way, if the incoming json had an attribute written in snake case like \"number_of_comments\", it'd look for a method called setNumber_of_comments, which does not follow the PSR-1 convention. \r\nWith this change, it now converts the name of the json attribute to camel case, and looks for the correct setter method."},"comment":{"url":"https://api.github.com/repos/netresearch/jsonmapper/issues/comments/88067226","html_url":"https://github.com/netresearch/jsonmapper/pull/30#issuecomment-88067226","issue_url":"https://api.github.com/repos/netresearch/jsonmapper/issues/30","id":88067226,"user":{"login":"mateusrevoredo","id":1175432,"avatar_url":"https://avatars.githubusercontent.com/u/1175432?v=3","gravatar_id":"","url":"https://api.github.com/users/mateusrevoredo","html_url":"https://github.com/mateusrevoredo","followers_url":"https://api.github.com/users/mateusrevoredo/followers","following_url":"https://api.github.com/users/mateusrevoredo/following{/other_user}","gists_url":"https://api.github.com/users/mateusrevoredo/gists{/gist_id}","starred_url":"https://api.github.com/users/mateusrevoredo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateusrevoredo/subscriptions","organizations_url":"https://api.github.com/users/mateusrevoredo/orgs","repos_url":"https://api.github.com/users/mateusrevoredo/repos","events_url":"https://api.github.com/users/mateusrevoredo/events{/privacy}","received_events_url":"https://api.github.com/users/mateusrevoredo/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T12:34:53Z","updated_at":"2015-03-31T12:34:53Z","body":"I'm sorry but I didn't get how can I use the magic method `__set()` when parsing a json file automatically using this library.\r\n\r\nI understand that PSR-1 is a personal coding style. But the reason I sent the pull request was to fix the way the library was handling json properties in snake case. When a property like this(in snake case) comes in the json, the library tries to look for a setter in the class named: **half in camel case**, **half in snake case**.\r\n\r\ne.g.\r\n\r\n```\r\n[{\r\n    \"last_action_time\": \"2015-02-24T16:25:51.696Z\",\r\n    \"author_name\": \"ABCDEFG\",\r\n    \"author_profile\": \"http://example.com\"\r\n}]\r\n```\r\n\r\nIn this case the library is going to look for a property named `last_action_time` in the class we're trying to parse. Right now, if it doesn't find this property, it's going to look for a method called `setLast_action_time` or `setAuthor_name` which is neither camel case nor snake case. \r\nDon't you think it is a bit unusual to have a mix of standards in a method name like this? \r\nMy change tries to fix this behaviour converting everything(setter methods) to camel case. e.g.: `setLastActionTime` or `setAuthorName`.\r\n\r\nThe decision is yours, but I personally find it a little bit more usual than having this mixed set of standards in the same class."}}