Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5142] Android: JSON.stringify misbehaviors on Android <2.2

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-05-16T19:34:27.000+0000
Affected Version/sRelease 1.6.2, Release 1.7.2, Release 1.8.0
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, json, json.stringify
ReporterEduardo Gomez
AssigneeNeeraj Gupta
Created2011-08-29T07:19:57.000+0000
Updated2017-03-09T23:28:17.000+0000

Description

Problem

JSON encode objects which looks like a logarithmic expression e.g. example: {"value":1.309990454089E12}

Tested on

Android HVGA Emulator

Repro sequence

{noformat} var value=1309990454089; Ti.API.info('Android JSON encode example: '+JSON.stringify(value) ); {noformat}

Console Output

{noformat} I/TiAPI ( 381): (kroll$1: app://app.js) [52,469] Android JSON encode example: 2147483647 {noformat}

Repro sequence

{noformat} var obj={}; obj.value=1309990454089; Ti.API.info('Android JSON encode example: '+ JSON.stringify(obj) ); {noformat}

Console Output

{noformat} I/TiAPI ( 245): (kroll$1: app://app.js) [3,957] Android JSON encode example: {"value":1.309990454089E12} {noformat}

Associated HD ticket

#APP-721536

Comments

  1. Nikhil Sharma 2012-05-16

    Don't support < android 2.2
  2. Eduardo Gomez 2012-05-16

    @Nikhil Check out first each Titanium Mobile SDK that supports a specific range of Android versions. This jira ticket filed Titanium SDK: 1.6.X which is enabled for Min Android/SDK Version: 1.6 (API 4). Further info: [https://wiki.appcelerator.org/display/guides/Titanium+Compatibility+Matrix#TitaniumCompatibilityMatrix-AndroidSDK%2FTargetAndroidPlatform] You may want to verify if this is not longer an issue for our customer instead.
  3. Neeraj Gupta 2012-05-16

    Marking this ticket invalid as we don't support Android SDK < 2.2 version anymore.
  4. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source