Truncation error when trying to deserialize an array (automatically assuming the data points as Int64)

Hi, I am trying to deserialize JSON to a BSON document class we have created. The issue comes in when trying to deserialize an array of data points to a double array as a property of the BSON document class. When deserializing the JSON, the data points are automatically being picked up as Int64 and throwing an “Error: Truncation will result in data loss” error when trying to convert to doubles.

Here is a sample JSON of the data points that are throwing an error:

{
“data”: [
24292806465719980,
24566848045962800,
24842960380968970,
]
}

Weird thing is that none of the data points seem to be bigger than the maximum value of an Int64 so not sure why there would be a truncation issue.

The only solution I have found so far is if I add decimals to the end of the numbers, such as like this:

{
“data”: [
24292806465719980.0,
24566848045962800.0,
24842960380968970.0,
]
}

Then the error is no longer thrown. I am thinking that is because the BsonSerializer automatically is assuming the numbers are doubles so there is no problem deserializing them. However, we have millions of JSON files with data arrays where the data is stored as in the previous case where the BsonSerializer is automatically assuming the numbers are Int64, and then throwing the truncation error when trying to convert the Int64 to a double.

MongoDB.Bson.TruncationException: Truncation resulted in data loss.
at MongoDB.Bson.Serialization.Options.RepresentationConverter.ToDouble(Int64 value)
at MongoDB.Bson.Serialization.Serializers.DoubleSerializer.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)

Is there a way to modify the BsonSerializer to automatically assume the numbers are doubles, specifically when deserializing/serializing? Or is there another solution?