1. Ricardo Jasso
  2. PowerBuilder
  3. Wednesday, 4 September 2019 01:03 AM UTC

Hi all,

When exporting large numbers to JSON using the ExportJSON DataWindow method the numbers are converted to scientific notation and precision is lost.

For example, a number like 284,932,785.56 gets converted to something like 2.8493E+08 (don't remember how many decimals) in the JSON string which is then imported as 284,930,000.00 using the ImportJSON method.

Is there a setting in the DataWindow control or object that can correct this?

Regards,

Ricardo

 

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 4 September 2019 06:32 AM UTC
  2. PowerBuilder
  3. # Permalink
0
Votes
Undo

Hi Ricardo

 

I can reproduce this issue on my end and have submitted it to the Appeon development team and they will fix it.

At the present, you can only work it around via change the column type in DW to Long type (to replace the Number type) or Varchar type (to replace the Decimal type).

 

Furthermore, it would be better if you could submit this bug to our support ticketing system https://www.appeon.com/standardsupport/ to ensure it is being properly received by our tech support and tracked.

 

Regards,

Ken

 

Comment
There are no comments made yet.
Ricardo Jasso Accepted Answer Pending Moderation
  1. Wednesday, 4 September 2019 11:31 AM UTC
  2. PowerBuilder
  3. # 1
0
Votes
Undo

Thank you Ken.

That's what we did as a workaround. Convert the values to varchar in the select statement and treat them as strings. Since we use it for display purposes it didn't affect the end process.

I'll submit the bug report.

Regards,

Ricardo

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.