Formatting JSON truncates number

Having trouble installing Oxygen? Got a bug to report? Post it all here.
tatternutz
Posts: 3
Joined: Mon Feb 08, 2016 6:27 pm

Formatting JSON truncates number

Post by tatternutz »

Code: Select all


{"value": 8.00,"type": "CURRENCY","name": "LLC_BI__Amount__c","label": "Original Amount","isRequired": false}
After formatting

Code: Select all


{
"value": 8,
"type": "CURRENCY",
"name": "LLC_BI__Amount__c",
"label": "Original Amount",
"isRequired": false
}
What preference can I set to retain the 8.00?
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Formatting JSON truncates number

Post by Radu »

Hi,

Sorry but we do not have a setting for this. I will add an issue for this on our side. Right now the format and indent loads the JSON as an internal object and then serializes it, thus forgetting the original format for numbers and sometimes like in your case outputting an equivalent.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Formatting JSON truncates number

Post by Radu »

Hi,

Just to update this thread, we released Oxygen 20.1 which along lots of other JSON-related improvements also has a fix for this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply