JSONParser does not parse double in scientific notation

27 views
Skip to first unread message

CS

unread,
Jan 6, 2014, 7:49:09 AM1/6/14
to codenameone...@googlegroups.com
Dear CNO team,

I noticed that com.codename1.io.JSONParser class does not parse double values written in scientific notation.

I believe when parsing a number two cases should be added. Namely:
case 'e':
case 'E':
for reading the exponent part of value. In this way the used "Double.parseDouble" method should parse "scientific" numbers just fine.

Regards.
                        

Shai Almog

unread,
Jan 6, 2014, 12:32:29 PM1/6/14
to codenameone...@googlegroups.com, computer.s...@gmail.com
Hi,
do you mean below line 309 in json parser?

CS

unread,
Jan 6, 2014, 12:50:34 PM1/6/14
to codenameone...@googlegroups.com
Yes, before line
currentToken.append(c);

Shai Almog

unread,
Jan 6, 2014, 12:56:32 PM1/6/14
to codenameone...@googlegroups.com, computer.s...@gmail.com
No problem, we will add it for the next update.
Reply all
Reply to author
Forward
0 new messages