Formatting JSON truncates number

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
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?
Posts: 5337

Re: Formatting JSON truncates number

Fri Dec 16, 2016 10:56 am


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.

Radu Coravu
<oXygen/> XML Editor

Return to “Common Problems”

Who is online

Users browsing this forum: Bing [Bot] and 0 guests