From 218e81aec342d7d24838c9027a92393d09e40a79 Mon Sep 17 00:00:00 2001 From: Maya-Painter Date: Sun, 14 Apr 2024 12:39:32 -0700 Subject: [PATCH 1/8] initial commit --- .../CosmosSystemTextJsonSerializer.cs | 31 +++++++- .../Usage/SystemTextJson/Program.cs | 6 -- .../src/Serializer/CosmosLinqSerializer.cs | 71 ++----------------- .../Linq/LinqTestsCommon.cs | 25 ++++--- .../Linq/CosmosLinqJsonConverterTests.cs | 33 +++++---- 5 files changed, 70 insertions(+), 96 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs index 9305324ae6..ac1f9462c3 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs @@ -1,21 +1,24 @@ namespace Cosmos.Samples.Shared { using System.IO; + using System.Reflection; using System.Text.Json; + using System.Text.Json.Serialization; using Azure.Core.Serialization; - using Microsoft.Azure.Cosmos; /// /// Uses which leverages System.Text.Json providing a simple API to interact with on the Azure SDKs. /// // - public class CosmosSystemTextJsonSerializer : CosmosSerializer + public class CosmosSystemTextJsonSerializer : CosmosLinqSerializer { private readonly JsonObjectSerializer systemTextJsonSerializer; + private readonly JsonSerializerOptions jsonSerializerOptions; public CosmosSystemTextJsonSerializer(JsonSerializerOptions jsonSerializerOptions) { this.systemTextJsonSerializer = new JsonObjectSerializer(jsonSerializerOptions); + this.jsonSerializerOptions = jsonSerializerOptions; } public override T FromStream(Stream stream) @@ -44,6 +47,30 @@ public override Stream ToStream(T input) streamPayload.Position = 0; return streamPayload; } + + public override string SerializeMemberName(MemberInfo memberInfo) + { + JsonExtensionDataAttribute jsonExtensionDataAttribute = memberInfo.GetCustomAttribute(true); + if (jsonExtensionDataAttribute != null) + { + return null; + } + + JsonPropertyNameAttribute jsonPropertyNameAttribute = memberInfo.GetCustomAttribute(true); + if (!string.IsNullOrEmpty(jsonPropertyNameAttribute?.Name)) + { + return jsonPropertyNameAttribute.Name; + } + + if (this.jsonSerializerOptions.PropertyNamingPolicy != null) + { + return this.jsonSerializerOptions.PropertyNamingPolicy.ConvertName(memberInfo.Name); + } + + // Do any custom conversions here + + return memberInfo.Name; + } } // } diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs index d66d54f5a2..739595d262 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs @@ -115,8 +115,6 @@ private static async Task RunDemo() Console.WriteLine($"Created Completed activity with id {createCompletedActivity.Resource.Id} that cost {createCompletedActivity.RequestCharge}"); // Execute queries materializing responses using System.Text.Json - // NOTE: GetItemLinqQueryable does not support System.Text.Json attributes. LINQ will not translate the name based on the attributes - // which can result in no or invalid results coming back. https://github.com/Azure/azure-cosmos-dotnet-v3/issues/3250 using FeedIterator iterator = container.GetItemQueryIterator("select * from c where c.status = 'Completed'"); while (iterator.HasMoreResults) { @@ -177,19 +175,15 @@ private static async Task CleanupAsync() // public class ToDoActivity { - // Note: System.Text.Json attributes such as JsonPropertyName are currently applied on item CRUD operations and non-LINQ queries, but not on LINQ queries [JsonPropertyName("id")] public string Id { get; set; } - // Note: System.Text.Json attributes such as JsonPropertyName are currently applied on item CRUD operations and non-LINQ queries, but not on LINQ queries [JsonPropertyName("partitionKey")] public string PartitionKey { get; set; } - // Note: System.Text.Json attributes such as JsonPropertyName are currently applied on item CRUD operations and non-LINQ queries, but not on LINQ queries [JsonPropertyName("activityId")] public string ActivityId { get; set; } - // Note: System.Text.Json attributes such as JsonPropertyName are currently applied on item CRUD operations and non-LINQ queries, but not on LINQ queries [JsonPropertyName("status")] public string Status { get; set; } } diff --git a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs index 6f9406ea2f..78cfa952f4 100644 --- a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs +++ b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs @@ -8,73 +8,10 @@ namespace Microsoft.Azure.Cosmos /// /// This abstract class can be implemented to allow a custom serializer (Non [Json.NET serializer](https://www.newtonsoft.com/json/help/html/Introduction.htm)'s) /// to be used by the CosmosClient for LINQ queries. - /// - /// - /// This example implements the CosmosLinqSerializer contract. - /// This example custom serializer will honor System.Text.Json attributes. - /// - /// (Stream stream) - /// { - /// if (stream == null) - /// throw new ArgumentNullException(nameof(stream)); - /// - /// using (stream) - /// { - /// if (stream.CanSeek && stream.Length == 0) - /// { - /// return default; - /// } - /// - /// if (typeof(Stream).IsAssignableFrom(typeof(T))) - /// { - /// return (T)(object)stream; - /// } - /// - /// return (T)this.systemTextJsonSerializer.Deserialize(stream, typeof(T), default); - /// } - /// } - /// - /// public override Stream ToStream(T input) - /// { - /// MemoryStream streamPayload = new MemoryStream(); - /// this.systemTextJsonSerializer.Serialize(streamPayload, input, input.GetType(), default); - /// streamPayload.Position = 0; - /// return streamPayload; - /// } - /// - /// public override string SerializeMemberName(MemberInfo memberInfo) - /// { - /// System.Text.Json.Serialization.JsonExtensionDataAttribute jsonExtensionDataAttribute = - /// memberInfo.GetCustomAttribute(true); - /// if (jsonExtensionDataAttribute != null) - /// { - /// return null; - /// } - /// - /// JsonPropertyNameAttribute jsonPropertyNameAttribute = memberInfo.GetCustomAttribute(true); - /// - /// string memberName = !string.IsNullOrEmpty(jsonPropertyNameAttribute?.Name) - /// ? jsonPropertyNameAttribute.Name - /// : memberInfo.Name; - /// - /// // Users must add handling for any additional attributes here - /// - /// return memberName; - /// } - /// } - /// ]]> - /// - /// + /// + /// + /// https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs + /// public abstract class CosmosLinqSerializer : CosmosSerializer { /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs index ab5155cbfe..eec1253db9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs @@ -836,11 +836,13 @@ public override void SerializeAsXml(XmlWriter xmlWriter) class SystemTextJsonLinqSerializer : CosmosLinqSerializer { - private readonly JsonObjectSerializer systemTextJsonSerializer; + private readonly JsonObjectSerializer systemTextJsonSerializer; + private readonly JsonSerializerOptions jsonSerializerOptions; public SystemTextJsonLinqSerializer(JsonSerializerOptions jsonSerializerOptions) { - this.systemTextJsonSerializer = new JsonObjectSerializer(jsonSerializerOptions); + this.systemTextJsonSerializer = new JsonObjectSerializer(jsonSerializerOptions); + this.jsonSerializerOptions = jsonSerializerOptions; } public override T FromStream(Stream stream) @@ -882,12 +884,19 @@ public override string SerializeMemberName(MemberInfo memberInfo) } JsonPropertyNameAttribute jsonPropertyNameAttribute = memberInfo.GetCustomAttribute(true); - - string memberName = !string.IsNullOrEmpty(jsonPropertyNameAttribute?.Name) - ? jsonPropertyNameAttribute.Name - : memberInfo.Name; - - return memberName; + if (!string.IsNullOrEmpty(jsonPropertyNameAttribute?.Name)) + { + return jsonPropertyNameAttribute.Name; + } + + if (this.jsonSerializerOptions.PropertyNamingPolicy != null) + { + return this.jsonSerializerOptions.PropertyNamingPolicy.ConvertName(memberInfo.Name); + } + + // Do any custom conversions here + + return memberInfo.Name; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs index e3882b3bf3..d37c84925e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs @@ -198,7 +198,7 @@ class TestCustomJsonLinqSerializer : CosmosLinqSerializer { private readonly JsonObjectSerializer systemTextJsonSerializer; - public static readonly System.Text.Json.JsonSerializerOptions JsonOptions = new() + public readonly System.Text.Json.JsonSerializerOptions jsonSerializerOptions = new() { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, PropertyNameCaseInsensitive = true, @@ -209,7 +209,7 @@ class TestCustomJsonLinqSerializer : CosmosLinqSerializer public TestCustomJsonLinqSerializer() { - this.systemTextJsonSerializer = new JsonObjectSerializer(JsonOptions); + this.systemTextJsonSerializer = new JsonObjectSerializer(this.jsonSerializerOptions); } public override T FromStream(Stream stream) @@ -237,9 +237,9 @@ public override Stream ToStream(T input) this.systemTextJsonSerializer.Serialize(stream, input, input.GetType(), default); stream.Position = 0; return stream; - } - - public override string SerializeMemberName(MemberInfo memberInfo) + } + + public override string SerializeMemberName(MemberInfo memberInfo) { System.Text.Json.Serialization.JsonExtensionDataAttribute jsonExtensionDataAttribute = memberInfo.GetCustomAttribute(true); @@ -247,14 +247,21 @@ public override string SerializeMemberName(MemberInfo memberInfo) { return null; } - - JsonPropertyNameAttribute jsonPropertyNameAttribute = memberInfo.GetCustomAttribute(true); - - string memberName = jsonPropertyNameAttribute != null && !string.IsNullOrEmpty(jsonPropertyNameAttribute.Name) - ? jsonPropertyNameAttribute.Name - : memberInfo.Name; - - return memberName; + + JsonPropertyNameAttribute jsonPropertyNameAttribute = memberInfo.GetCustomAttribute(true); + if (!string.IsNullOrEmpty(jsonPropertyNameAttribute?.Name)) + { + return jsonPropertyNameAttribute.Name; + } + + if (this.jsonSerializerOptions.PropertyNamingPolicy != null) + { + return this.jsonSerializerOptions.PropertyNamingPolicy.ConvertName(memberInfo.Name); + } + + // Do any custom conversions here + + return memberInfo.Name; } } From d83937833bcde20d9fa10eb1a178c882b5b3537f Mon Sep 17 00:00:00 2001 From: Maya-Painter Date: Mon, 15 Apr 2024 19:13:10 -0700 Subject: [PATCH 2/8] bump sample version --- .../Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs | 1 + .../Usage/SystemTextJson/SystemTextJson.csproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs index ac1f9462c3..6a5c49b58f 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs @@ -5,6 +5,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using Azure.Core.Serialization; + using Microsoft.Azure.Cosmos; /// /// Uses which leverages System.Text.Json providing a simple API to interact with on the Azure SDKs. diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj index d664373ed6..63e3311871 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj @@ -14,7 +14,7 @@ - + From db7ff3df7f7ffe95e076e0c75f9890c032539477 Mon Sep 17 00:00:00 2001 From: Maya-Painter Date: Tue, 16 Apr 2024 13:01:28 -0700 Subject: [PATCH 3/8] update comments --- .../Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs | 2 +- .../Linq/LinqTestsCommon.cs | 4 ++-- .../Linq/CosmosLinqJsonConverterTests.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs index 6a5c49b58f..713f033f82 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs @@ -68,7 +68,7 @@ public override string SerializeMemberName(MemberInfo memberInfo) return this.jsonSerializerOptions.PropertyNamingPolicy.ConvertName(memberInfo.Name); } - // Do any custom conversions here + // Do any additional handling of JsonSerializerOptions here. return memberInfo.Name; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs index eec1253db9..6e62be7cef 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs @@ -894,8 +894,8 @@ public override string SerializeMemberName(MemberInfo memberInfo) return this.jsonSerializerOptions.PropertyNamingPolicy.ConvertName(memberInfo.Name); } - // Do any custom conversions here - + // Do any additional handling of JsonSerializerOptions here. + return memberInfo.Name; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs index d37c84925e..d6bb329025 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs @@ -198,7 +198,7 @@ class TestCustomJsonLinqSerializer : CosmosLinqSerializer { private readonly JsonObjectSerializer systemTextJsonSerializer; - public readonly System.Text.Json.JsonSerializerOptions jsonSerializerOptions = new() + private readonly System.Text.Json.JsonSerializerOptions jsonSerializerOptions = new() { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, PropertyNameCaseInsensitive = true, @@ -259,7 +259,7 @@ public override string SerializeMemberName(MemberInfo memberInfo) return this.jsonSerializerOptions.PropertyNamingPolicy.ConvertName(memberInfo.Name); } - // Do any custom conversions here + // Do any additional handling of JsonSerializerOptions here. return memberInfo.Name; } From b34727b439de8ebe098a1133b20dc39dbb64058d Mon Sep 17 00:00:00 2001 From: Maya-Painter Date: Wed, 17 Apr 2024 14:39:39 -0700 Subject: [PATCH 4/8] sln file fix --- .../Usage/SystemTextJson/SystemTextJson.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj index 63e3311871..d664373ed6 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/SystemTextJson.csproj @@ -14,7 +14,7 @@ - + From df17e6fc53a4ba735f00a030855a35fd726da48c Mon Sep 17 00:00:00 2001 From: Maya-Painter Date: Thu, 18 Apr 2024 10:45:45 -0700 Subject: [PATCH 5/8] update comment --- .../Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs index 713f033f82..02b529939a 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs @@ -11,6 +11,9 @@ /// Uses which leverages System.Text.Json providing a simple API to interact with on the Azure SDKs. /// // + /// + /// For item CRUD operations and non-LINQ queries, implementing CosmosSerializer is sufficient. To support LINQ query translations as well, CosmosLinqSerializer must be implemented. + /// public class CosmosSystemTextJsonSerializer : CosmosLinqSerializer { private readonly JsonObjectSerializer systemTextJsonSerializer; From e59e7170ea223fd9b087eb1cf73ed6a5df93d2aa Mon Sep 17 00:00:00 2001 From: Maya Painter <130110800+Maya-Painter@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:06:19 -0700 Subject: [PATCH 6/8] Update Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs Co-authored-by: Matias Quaranta --- .../src/Serializer/CosmosLinqSerializer.cs | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs index 78cfa952f4..ce01391e79 100644 --- a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs +++ b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs @@ -1,25 +1,26 @@ -//------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -//------------------------------------------------------------ -namespace Microsoft.Azure.Cosmos -{ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ +namespace Microsoft.Azure.Cosmos +{ using System.Reflection; - /// - /// This abstract class can be implemented to allow a custom serializer (Non [Json.NET serializer](https://www.newtonsoft.com/json/help/html/Introduction.htm)'s) - /// to be used by the CosmosClient for LINQ queries. + /// + /// This abstract class can be implemented to allow a custom serializer (Non [Json.NET serializer](https://www.newtonsoft.com/json/help/html/Introduction.htm)'s) + /// to be used by the CosmosClient for LINQ queries. /// - /// - /// https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs - /// - public abstract class CosmosLinqSerializer : CosmosSerializer - { - /// - /// Convert a MemberInfo to a string for use in LINQ query translation. - /// This must be implemented when using a custom serializer for LINQ queries. - /// - /// Any MemberInfo used in the query. - /// A serialized representation of the member. - public abstract string SerializeMemberName(MemberInfo memberInfo); - } -} + /// + /// Refer to the sample project for a full implementation. + + /// + public abstract class CosmosLinqSerializer : CosmosSerializer + { + /// + /// Convert a MemberInfo to a string for use in LINQ query translation. + /// This must be implemented when using a custom serializer for LINQ queries. + /// + /// Any MemberInfo used in the query. + /// A serialized representation of the member. + public abstract string SerializeMemberName(MemberInfo memberInfo); + } +} From 452ef56a1167937db3db3d66de88e5a798243dd6 Mon Sep 17 00:00:00 2001 From: Maya-Painter Date: Thu, 18 Apr 2024 11:15:34 -0700 Subject: [PATCH 7/8] remarks fix --- .../Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs index 02b529939a..5213e3bb7d 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs @@ -10,10 +10,10 @@ /// /// Uses which leverages System.Text.Json providing a simple API to interact with on the Azure SDKs. /// - // /// - /// For item CRUD operations and non-LINQ queries, implementing CosmosSerializer is sufficient. To support LINQ query translations as well, CosmosLinqSerializer must be implemented. + /// For item CRUD operations and non-LINQ queries, implementing CosmosSerializer is sufficient. To support LINQ query translations as well, CosmosLinqSerializer must be implemented. /// + // public class CosmosSystemTextJsonSerializer : CosmosLinqSerializer { private readonly JsonObjectSerializer systemTextJsonSerializer; From b519a0b30cfc0eb18c91126e27def3f03fb4507b Mon Sep 17 00:00:00 2001 From: Maya-Painter Date: Thu, 18 Apr 2024 12:11:09 -0700 Subject: [PATCH 8/8] xml fix --- Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs index ce01391e79..e2e898d15b 100644 --- a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs +++ b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializer.cs @@ -11,7 +11,6 @@ namespace Microsoft.Azure.Cosmos /// /// /// Refer to the sample project for a full implementation. - /// public abstract class CosmosLinqSerializer : CosmosSerializer {