{ "id": "123421", "key": "TIMOB-15929", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-07-08T22:29:57.000+0000", "created": "2013-12-06T15:17:11.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "json", "module", "parity", "require" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-20T19:11:03.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": "In iOS, you can do:\r\n\r\n{code:javascript}\r\nvar object = require('data.json');\r\n{code}\r\n\r\nOn Android, you can't and get:\r\n\r\n{code}\r\n[ERROR] TiExceptionHandler: (main) [545,551] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] TiExceptionHandler: (main) [0,551] - In ti:/module.js:280,9\r\n[ERROR] TiExceptionHandler: (main) [0,551] - Message: Uncaught Error: Requested module not found: data/book.json\r\n[ERROR] TiExceptionHandler: (main) [0,551] - Source: \t\tthrow new Error(\"Requested module not found: \" + request);\r\n{code}\r\n\r\nThis should be quite easy to add to:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/common/src/js/module.js", "attachment": [], "flagged": false, "summary": "Parity: Android should support require-ing .json files like on iOS", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 3.2.0-beta", "comment": { "comments": [ { "id": "283222", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hi Fokke,\n\nThanks for submitting this request. I have moved your request to TIMOB so that Engineering can consider this for future release. If you have any question or comment, please feel free to post it here.\n\nRegards,", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-09T17:11:30.000+0000", "updated": "2013-12-09T17:11:30.000+0000" }, { "id": "423729", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is supported in 6.0 as part of the major require-changes.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-07-08T22:29:57.000+0000", "updated": "2017-07-08T22:29:57.000+0000" }, { "id": "424471", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-20T19:11:03.000+0000", "updated": "2017-07-20T19:11:03.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }