I'm using Azure APIM policy expression to aggregate multiple responses. I have some decimal values in the response. But while Deserializing , formatting was changed as shown in the output. I want to return as in the Input.
INPUT
{
"x1": 1.55391E4,
"x2": 2.2173244E5,
"x3": 1.11226E3,
"UpdatedDateTime": "2023-01-17T20:45:51.959+08:00"
}
OUTPUT
{
"x1": 15539.1,
"x2": 221732.44,
"x3": 1112.26,
"UpdatedDateTime": "2023-01-17T20:45:51.959+08:00"
}
EXPECTED
{
"x1": 1.55391E4,
"x2": 2.2173244E5,
"x3": 1.11226E3,
"UpdatedDateTime": "2023-01-17T20:45:51.959+08:00"
}
This is my fiddle
In this sample, I have preserved the DateTimeZone with Offset. but I can't do the decimal fields (x1, x2, x3). I just wants to return as it is like input.
Please note that I'm writing this inside a policy expression, so I can't create any C# extensions or helper methods.