Skip to content

Commit b54ac2d

Browse files
author
Bar Nuri
committed
fix build
1 parent 2020fa7 commit b54ac2d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

CSharpExtensions.OpenSource.Mongo.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<ItemGroup>
1010
<PackageReference Include="CSharpExtensions.OpenSource" Version="1.0.0" />
1111
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
12-
<PackageReference Include="MongoDB.Bson" Version="(2.9.0,)" />
13-
<PackageReference Include="MongoDB.Driver" Version="(2.9.0,)" />
12+
<PackageReference Include="MongoDB.Bson" Version="[2.9.0, )" />
13+
<PackageReference Include="MongoDB.Driver" Version="[2.9.0, )" />
1414
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
1515
</ItemGroup>
1616

MongoExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public static IAsyncCursor<BsonDocument> Aggregate<T>(this IMongoCollection<T> c
240240
string? json = "";
241241
if (value is BsonDocument)
242242
{
243-
var jsonWriterSettings = new MongoDB.Bson.IO.JsonWriterSettings { OutputMode = MongoDB.Bson.IO.JsonOutputMode.CanonicalExtendedJson };
243+
var jsonWriterSettings = new MongoDB.Bson.IO.JsonWriterSettings { OutputMode = MongoDB.Bson.IO.JsonOutputMode.Strict };
244244
json = value.ToJson(jsonWriterSettings);
245245
}
246246
else
@@ -337,7 +337,7 @@ public static T CleanupBson<T>(this T value)
337337
return value;
338338
}
339339

340-
public static string BsonToJson<T>(this T value, bool format = false, MongoDB.Bson.IO.JsonOutputMode jsonOutputMode = MongoDB.Bson.IO.JsonOutputMode.CanonicalExtendedJson)
340+
public static string BsonToJson<T>(this T value, bool format = false, MongoDB.Bson.IO.JsonOutputMode jsonOutputMode = MongoDB.Bson.IO.JsonOutputMode.Strict)
341341
=> MongoDB.Bson.BsonExtensionMethods.ToJson(value,
342342
new MongoDB.Bson.IO.JsonWriterSettings
343343
{

0 commit comments

Comments
 (0)