{ "id": "78705", "key": "TIMOB-4876", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11365", "description": "Mobile 1.8.0 M12", "name": "Sprint 2011-33", "archived": true, "released": true, "releaseDate": "2011-08-22" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-08-26T09:34:48.000+0000", "created": "2011-08-03T09:44:58.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "hasOwnProperty", "json" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [ { "id": "12362", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "64005", "key": "TIMOB-3373", "fields": { "summary": "Android: hasOwnProperty function fails", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Trivial", "id": "5" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:46:22.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The function hasOwnProperty does not work in android when using a JSON object. Reason is that the JSON object ends up having double quotes on its properties making it a stringified object.\r\n\r\nFor example, this does not work on Android:\r\n{code}\r\nvar json = JSON.stringify({x: 1});\r\n\r\nalert(JSON.parse(json).hasOwnProperty('x'));\r\n{code}\r\nIf you where to alert the json alone, it would alert:\r\n{code}\r\n{ \"x\" : 1 }\r\n{code}\r\nThis, instead, works fine:\r\n{code}\r\nalert( ({x: 1}).hasOwnProperty('x') );\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android - \"hasOwnProperty\" and JSON.parse incompatible", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "161980", "author": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Doublequoted keys in objects is perfectly legal in javascript and there is absolutely no reason why this should result in an object where the hasOwnProperty-method is 'undefined'.\r\n", "updateAuthor": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-05T03:48:25.000+0000", "updated": "2011-08-05T03:48:25.000+0000" }, { "id": "161983", "author": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-05T04:02:29.000+0000", "updated": "2011-08-05T04:02:29.000+0000" }, { "id": "163592", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "To test this, you can simply run the {{json}} test suite in Drillbit, which has a new test that tests all kinds of different prototype functions for Object, String, Array, and Boolean on objects returned from {{JSON.parse}}.", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-22T01:02:14.000+0000", "updated": "2011-08-22T01:02:14.000+0000" }, { "id": "165721", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ran drillbit with version=1.8.0\ntimestamp=09/12/11 15:27\ngithash=8169a91\nAll test pass", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-12T16:00:41.000+0000", "updated": "2011-09-12T16:00:41.000+0000" }, { "id": "172024", "author": { "name": "herzberg", "key": "herzberg", "displayName": "Sven Herzberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "How is this fixed? By changing the runtime to v8? Or is that fixed for anybody?", "updateAuthor": { "name": "herzberg", "key": "herzberg", "displayName": "Sven Herzberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-11-09T06:22:32.000+0000", "updated": "2011-11-09T06:22:32.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }