Decimal numbers in json body have comma (!) instead of point as decimal separator

Using an api connector to an external service.
The json body includes numeric values, with decimals.

However, while a properly formatted json number needs to have no quotes and a dot as decimal separator, Bubble generates numbers with comma as decimal separator.

Example, instead of:

"amount": 24.5,

… Bubble generates:

"amount": 24,5,

… which breaks the json. Note that this is in an app with a “comma” locale, yes, but

  1. the number itself is entered with a decimal point
  2. according to Note on change in behavior of inputs that use decimals , it shouldn’t be an issue anyway, as the number only has two decimals, so no ambiguity
  3. either way, the json format needs to have a decimal point (a dot) and not a comma.

I’m wondering if this is a bug, or rather, I’m missing something. Is the api connector supposed to generate properly formatted json anyway, or do I have to process the variable somehow?
Also, please note that this didn’t happen before, it started happening somewhere around August this year.

Beginner here, so please bear with me, I might be completely off.

Thank you!

1 Like

Hi, I’m working with @m.varie and I wish to add a detail.
The external service is named Adamo and produces invoices. The API set in in Bubble has been working properly for 6 months when at the beginning of September - without anything being changed on our side - the API apparently started passing to the external service a comma instead of a dot. This caused Adamo to produce a blank invoice. In particular.
if I pass variable = 24 it works
if I pass variable = 24.5 it doesn’t work anymore

In Postman I could replicate the same wrong response (a blank invoice) by passing 24,5 instead of 24.5.

1 Like

Hi @allenyang and @eve do you have any suggestion? Thanks in advance.

Contact support about this via bug report. Unless you’re formatting as text using comma as the separator this is probably a bug in their new treatment of app language preferences. Support | Bubble

1 Like

I have exactly the same issue, but i didn’t realize exactly what was going on until i read your post. I am saving data from Tink API to Backendless using Api Connector and i was not abble to save decimal amount.
I changed type on Backendless from decimal to string and then i realized that the decimal number is sent with comma in spite of point.

@gianluca1 @m.varie hi i solved it on my side. I switched the primary language of my app from French to English.Then the decimal number sent by api connector i using the point in spite of comma.
You should try to switch the primary language of your app to English and give a try.

1 Like