Hello Brian
Just a guess but I am guessing that the number if being parsed using the language locale which can of course change by country. For example in the UK the . is used as the decimal separator and , to separate 1000's. So one thousand point 56 is 1,000.56 however in Germany the . and , usage is reversed so one thousand point 56 is 1.000,56
I hope that makes sense and may go some way to explaining the behaviour. It may be worth formatting based on the langauge locale and see if that solves your problem (.net has plenty of classes to help with this).
Hi David
Thanks for your input. I will take it up with our Episerver partner.
Hi Guys
Im not a Episerver expert, but an integration partner, so basic please.
I sending a decimal number in json with dot as decimal seperator.
If there is more than 2 decimal, then danish and german is converted into thousands.
So 0.153 turns into 153, but english and frence er fine. (its also 153 in backend, so not caused by frontend)
Why is dot treated that way in these languages and what controls this behavior?
Should i format decimal diffenrently for each language og just use string?
Thanks.
Metafield payload
{
"Name": "NetWeight",
"Type": "Decimal",
"Data": [
{
"Language": "da",
"Value": 0.841
},
{
"Language": "de",
"Value": 0.841
},
{
"Language": "en",
"Value": 0.841
},
{
"Language": "fr",
"Value": 0.841
}
]
}