{"action":"created","issue":{"url":"https://api.github.com/repos/jsonmodel/jsonmodel/issues/625","repository_url":"https://api.github.com/repos/jsonmodel/jsonmodel","labels_url":"https://api.github.com/repos/jsonmodel/jsonmodel/issues/625/labels{/name}","comments_url":"https://api.github.com/repos/jsonmodel/jsonmodel/issues/625/comments","events_url":"https://api.github.com/repos/jsonmodel/jsonmodel/issues/625/events","html_url":"https://github.com/jsonmodel/jsonmodel/issues/625","id":362856683,"node_id":"MDU6SXNzdWUzNjI4NTY2ODM=","number":625,"title":"BOOL are mapped to 1 and 0 instead of true and false","user":{"login":"rurza","id":2467137,"node_id":"MDQ6VXNlcjI0NjcxMzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2467137?v=4","gravatar_id":"","url":"https://api.github.com/users/rurza","html_url":"https://github.com/rurza","followers_url":"https://api.github.com/users/rurza/followers","following_url":"https://api.github.com/users/rurza/following{/other_user}","gists_url":"https://api.github.com/users/rurza/gists{/gist_id}","starred_url":"https://api.github.com/users/rurza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rurza/subscriptions","organizations_url":"https://api.github.com/users/rurza/orgs","repos_url":"https://api.github.com/users/rurza/repos","events_url":"https://api.github.com/users/rurza/events{/privacy}","received_events_url":"https://api.github.com/users/rurza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-22T13:19:36Z","updated_at":"2018-09-25T22:17:20Z","closed_at":null,"author_association":"NONE","body":"JSONModel 1.8.0\r\n\r\nAll BOOL properties are now mapped as a number instead of JS boolean. It can potentially break a lot of the existing code (like mine <3)."},"comment":{"url":"https://api.github.com/repos/jsonmodel/jsonmodel/issues/comments/424520430","html_url":"https://github.com/jsonmodel/jsonmodel/issues/625#issuecomment-424520430","issue_url":"https://api.github.com/repos/jsonmodel/jsonmodel/issues/625","id":424520430,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDUyMDQzMA==","user":{"login":"weevilgenius","id":931455,"node_id":"MDQ6VXNlcjkzMTQ1NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/931455?v=4","gravatar_id":"","url":"https://api.github.com/users/weevilgenius","html_url":"https://github.com/weevilgenius","followers_url":"https://api.github.com/users/weevilgenius/followers","following_url":"https://api.github.com/users/weevilgenius/following{/other_user}","gists_url":"https://api.github.com/users/weevilgenius/gists{/gist_id}","starred_url":"https://api.github.com/users/weevilgenius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weevilgenius/subscriptions","organizations_url":"https://api.github.com/users/weevilgenius/orgs","repos_url":"https://api.github.com/users/weevilgenius/repos","events_url":"https://api.github.com/users/weevilgenius/events{/privacy}","received_events_url":"https://api.github.com/users/weevilgenius/received_events","type":"User","site_admin":false},"created_at":"2018-09-25T22:17:20Z","updated_at":"2018-09-25T22:17:20Z","author_association":"NONE","body":"This appears to be Mac OS-specific. I have a tiny reproducible case which passes when run under iOS tests, but fails under Mac OS tests.\r\n\r\n```ObjC\r\n// simple test object\r\n@interface BoolTestObject : JSONModel\r\n@property (nonatomic, assign) BOOL isAwesome;\r\n@property (nonatomic, assign) BOOL isTerrible;\r\n@end\r\n\r\n@implementation BoolTestObject\r\n@end\r\n\r\n// https://github.com/jsonmodel/jsonmodel/issues/625\r\n- (void) testBoolToJson {\r\n\tBoolTestObject *b = [[BoolTestObject alloc] init];\r\n\tb.isAwesome = YES;\r\n\tb.isTerrible = NO;\r\n\r\n\tNSString *expected = @\"{\\\"isAwesome\\\":true,\\\"isTerrible\\\":false}\";\r\n\tNSString *json = [b toJSONString];\r\n\tXCTAssertEqualObjects(expected, json); // fails on Mac OS\r\n}\r\n```"}}
{"actor":{"display_login":"weevilgenius"}}