<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />

BsonObjectId

public class BsonObjectId
Represents a BSON Oid (object id).
using Newtonsoft.Json.Utilities; using System; namespace Newtonsoft.Json.Bson { public class BsonObjectId { public byte[] Value { get; set; } public BsonObjectId(byte[] value) { ValidationUtils.ArgumentNotNull(value, "value"); if (value.Length != 12) throw new ArgumentException("An ObjectId must be 12 bytes", "value"); Value = value; } } }