I am parsing some json into a class like this
class RateResponse
{
[JsonPropertyName("rate")]
public decimal Rate { get; set; }
}
this JSON has "rate":2.59862290042482836918240E-10
part and I am parsing it with standard System.Text.Json
api on .NET 8:
JsonSerializer.Deserialize<RateResponse>(json, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
It works fine on my local Windows machine, I am deploying it to Ubuntu VMs in a docker container (all standard IDE generated). Now I have 2 physically separate environments: dev and staging, this exact code works fine in dev but in staging it never succeeds and just keeps writing logs: Cannot get the value of a token type 'Null' as a number
.
How is this possible? Isn’t docker supposed to guarantee exactly the same runtime? What could be the reason of it? Some culture specific settings fetched from somewhere?