Fix deserialization of primitive arrays on Big Endian systems

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Unknown
    • 3.5.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Fully Compatible
    • Dotnet Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      This PR fixes deserialization issues in PrimitivesArrayReader.cs which caused 51 test failures in the MongoDB.Bson.Tests suite on Big Endian systems (e.g., IBM s390x).

      The deserialization logic relied on BitConverter.ToXxx(...) which assumes Little Endian memory layout. On Big Endian architectures, this results in incorrect values for arrays of primitive types such as Int64, Single, Double, and Decimal, leading to test failures.

              Assignee:
              Boris Dogadov
              Reporter:
              Medha Tiwari
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: