Page 1 of 1

Formatting JSON truncates number

Posted: Thu Dec 15, 2016 10:55 pm
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?

Re: Formatting JSON truncates number

Posted: Fri Dec 16, 2016 10:56 am
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

Re: Formatting JSON truncates number

Posted: Mon Jun 18, 2018 3:31 pm
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