Formatting JSON truncates number

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
tatternutz
Posts: 3

Formatting JSON truncates number

Thu Dec 15, 2016 10:55 pm

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: 5211

Re: Formatting JSON truncates number

Fri Dec 16, 2016 10:56 am

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

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 4 guests