{ "id": "63246", "key": "TIMOB-2614", "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": "11238", "name": "Release 1.6.0 M05", "archived": true, "released": true, "releaseDate": "2011-01-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:36.000+0000", "created": "2011-04-15T03:24:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.0", "reported-1.5.1" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:36.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": "{html}

With droid on 1.5.1 the stringify function seems to be returning\ninconsistent results. Everything works as expected with iphone.

\n

var r2 = JSON.stringify( {'0':'asf'} );
\nTi.API.error(\"Rest data: \" + r2);
\n//Rest data: {\"0\":null}

\n

var r3 = JSON.stringify(['abc','def'] );
\nTi.API.error(\"Rest data: \" + r3);
\n//Rest data: [\"abc\", \"def\"]

\n

var o = {'def':'abc'};
\nvar r4 = JSON.stringify( o );
\nTi.API.error(\"Rest data: \" + r4);
\n//Rest data: {def

\n

var user ='me';
\nvar pass = 'mypass';
\nvar enc = 'encoded';

\n

var credentials = {'user_name':user,'password':pass,'encryption'\n: enc};
\nvar restData =\nJSON.stringify({'0':credentials,'1':'mobile','2':{'name_value_list':{}}});
\nTi.API.error(\"Rest data: \" + restData);
\n//Rest data: {\"2\":null,\"1\":null,\"0\":null}

\n

var credentials = {'user_name':user,'password':pass,'encryption'\n: enc};
\nvar tmp =\n{'0':credentials,'1':'mobile','2':{'name_value_list':{}}};
\nvar restData = JSON.stringify(tmp);
\nTi.API.error(\"Rest data: \" + restData);
\n//Rest data: {\"2\":null,\"1\":null,\"0\":null}

{html}", "attachment": [], "flagged": false, "summary": "JSON.stringify failing for droid", "creator": { "name": "andreassandberg", "key": "andreassandberg", "displayName": "Andreas sandberg", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andreassandberg", "key": "andreassandberg", "displayName": "Andreas sandberg", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128982", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

@Matt Will you create a unit test for this. It should apply to\nboth platforms.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:24:48.000+0000", "updated": "2011-04-15T03:24:48.000+0000" }, { "id": "128983", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [4665727d92384c4144283c114a46268250f9ac87])\ncheck both string and integer types from Rhino, fixing\nObject->KrollDict conversion and JSON conversion [#2614\nstate:fixed-in-qa]
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/4665727d9238...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:24:49.000+0000", "updated": "2011-04-15T03:24:49.000+0000" }, { "id": "128984", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.6.0 (01/13/11\n08:11 7ca73a3) G1 (1.6) em (2.1) and droid1 (2.2.1), added to qa\ntests

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:24:49.000+0000", "updated": "2011-04-15T03:24:49.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }