Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1976] Android: JSON.stringify Does not Preserve Type

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:42.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M02
ComponentsAndroid
Labelsandroid, defect
ReporterDon Thorp
AssigneeMarshall Culpepper
Created2011-04-15T03:07:01.000+0000
Updated2011-04-17T01:57:42.000+0000

Description

alert(JSON.stringify(['001','002'])); it show "[001,002]"!! did it should show "['001','002']";

and, alert(JSON.stringify([1,2])); it show "[1.0,2.0]"!! did it should show "[1,2]";

Comments

  1. Marshall Culpepper 2011-04-15

    (from [860eacd7483c470a69561c575f0de2106d07f6a0]) whole numbers now get stringified as integers in JSON.stringify, removed some debugging in drillbit, added a new JSON test suite [#1976 state:fixed-in-qa milestone:"1.5.0 M02"] https://github.com/appcelerator/titanium_mobile/commit/860eacd7483c470a69561c575f0de2106d07f6a0"> https://github.com/appcelerator/titanium_mobile/commit/860eacd7483c...

  2. Matt Schmulen 2011-04-15

    pass regression android 2.1 sim

  3. Matt Schmulen 2011-04-15

    passed regression android 1.6 sim, Titanium SDK version: 1.5.0 (11/22/10 20:42 19a59fd)

JSON Source