[Gambas-user] Issue 517 in gambas: JSON.Decode incorrectly converts Integer data-type to Float

gambas at ...2524... gambas at ...2524...
Sat Mar 29 16:30:01 CET 2014


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 517 by uAle... at ...626...: JSON.Decode incorrectly converts  
Integer data-type to Float
http://code.google.com/p/gambas/issues/detail?id=517

1) Describe the problem.

When decoding a JSON string with "JSON.Decode", values like:
{ "value": 2 }

Is *always* converted to a Gambas Float datatype. According to the  
following link, i expect only values with a <dot> would be automatically  
converted to float:
http://gambasdoc.org/help/cat/float?v3
"If there is no decimal point and no exponant, then the number will be  
interpreted as an integer."

(Else what's the point of having integer/long in the JSON.Decode option  
list)

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):

Version: 3.5.2
Revision: r1234 (if you use a development version)
Operating system: Linux
Distribution: Ubuntu 13.10
Architecture: x86_64
GUI component: QT3 / QT4 / GTK+
Desktop used: Gnome / KDE ...

3) Provide a little project that reproduces the bug or the crash.

Attached

4) If your project needs a database, try to provide it, or part of it.

5) Explain clearly how to reproduce the bug or the crash.

6) By doing that carefully, you have done 50% of the bug fix job!

IMPORTANT NOTE: If you encounter several different problems or bugs, (for
example, a bug in your project, and an interpreter crash while debugging
it), please create distinct issues!

ANOTHER NOTE: Don't create an issue if you have a compilation problem on
the development version. Send a mail to the mailing-list instead, thanks.

Attachments:
	Test-JSON.tar.gz  5.4 KB

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings




More information about the User mailing list