Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemTextJsonSerializer: Adds UseSystemTextJsonSerializerWithOptions in CosmosClientOptions to Set the Default STJ Serializer #4589

Merged
merged 25 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d2efdd6
Code changes to make STJ serializer public for preview.
kundadebdatta Jul 16, 2024
bfdb850
Code changes to make STJ serializer public for GA.
kundadebdatta Jul 16, 2024
93a0f9c
Code changes to hide STJ serializer implementation behind a boolean f…
kundadebdatta Jul 19, 2024
c1ee171
Code changes to fix tests.
kundadebdatta Jul 19, 2024
b590a4e
Revert "Code changes to fix tests."
kundadebdatta Jul 19, 2024
e6cd9f4
Code changes to fix baseline test.
kundadebdatta Jul 19, 2024
9d93df2
Merge branch 'master' into users/kundadebdatta/make_stj_serializer_pu…
kundadebdatta Jul 19, 2024
c6a172c
Code changes to fix root cause.
kundadebdatta Jul 19, 2024
9015d6c
Code changes to update tests.
kundadebdatta Jul 19, 2024
7460f30
Code changes to address review comments.
kundadebdatta Jul 22, 2024
8c07f8f
Code changes to add serializer options as contract.
kundadebdatta Jul 22, 2024
7902872
Code changes to add serializer options as public contract in builder.
kundadebdatta Jul 22, 2024
8226f7b
Code changes to update contract to remove the STJ serializer boolean …
kundadebdatta Jul 23, 2024
6976042
Code changes to update summary.
kundadebdatta Jul 23, 2024
078ab71
Code changes for minor cosmetic update.
kundadebdatta Jul 23, 2024
100b8e0
Merge branch 'master' into users/kundadebdatta/make_stj_serializer_pu…
kundadebdatta Jul 23, 2024
ee2f83a
Code changes to fix xml comment.
kundadebdatta Jul 23, 2024
ef7073a
Code changes to move remarks to summary. Updated test.
kundadebdatta Jul 24, 2024
1f65a66
Code changes to move the validation logic in cosmos client options.
kundadebdatta Jul 24, 2024
58981c2
Code changes to update contract.
kundadebdatta Jul 24, 2024
3ba71ea
Merge branch 'master' into users/kundadebdatta/make_stj_serializer_pu…
kundadebdatta Jul 24, 2024
ac5d07e
Code changes to remove client context core logic in cosmos client opt…
kundadebdatta Jul 26, 2024
77bf9ec
Code changes to update some tests.
kundadebdatta Jul 29, 2024
ac50590
Merge branch 'master' into users/kundadebdatta/make_stj_serializer_pu…
kundadebdatta Jul 29, 2024
f246ba8
Code changes to update contract. Made cosmetic changes.
kundadebdatta Jul 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Cosmos
/// <summary>
/// This class provides a default implementation of System.Text.Json Cosmos Linq Serializer.
/// </summary>
internal class CosmosSystemTextJsonSerializer : CosmosLinqSerializer
public class CosmosSystemTextJsonSerializer : CosmosLinqSerializer
kundadebdatta marked this conversation as resolved.
Show resolved Hide resolved
{
/// <summary>
/// A read-only instance of <see cref="JsonSerializerOptions"/>.
Expand All @@ -25,7 +25,7 @@ internal class CosmosSystemTextJsonSerializer : CosmosLinqSerializer
/// with the default values for the Cosmos SDK
/// </summary>
/// <param name="jsonSerializerOptions">An instance of <see cref="JsonSerializerOptions"/> containing the json serialization options.</param>
internal CosmosSystemTextJsonSerializer(
public CosmosSystemTextJsonSerializer(
JsonSerializerOptions jsonSerializerOptions)
{
this.jsonSerializerOptions = jsonSerializerOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3407,7 +3407,34 @@
"NestedTypes": {}
},
"Microsoft.Azure.Cosmos.CosmosLinqSerializer;Microsoft.Azure.Cosmos.CosmosSerializer;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Subclasses": {
"Microsoft.Azure.Cosmos.CosmosSystemTextJsonSerializer;Microsoft.Azure.Cosmos.CosmosLinqSerializer;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
"System.IO.Stream ToStream[T](T)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.IO.Stream ToStream[T](T);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"System.String SerializeMemberName(System.Reflection.MemberInfo)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.String SerializeMemberName(System.Reflection.MemberInfo);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"T FromStream[T](System.IO.Stream)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "T FromStream[T](System.IO.Stream);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"Void .ctor(System.Text.Json.JsonSerializerOptions)": {
"Type": "Constructor",
"Attributes": [],
"MethodInfo": "[Void .ctor(System.Text.Json.JsonSerializerOptions), Void .ctor(System.Text.Json.JsonSerializerOptions)]"
}
},
"NestedTypes": {}
}
},
"Members": {
"System.String SerializeMemberName(System.Reflection.MemberInfo)": {
"Type": "Method",
Expand Down Expand Up @@ -3658,7 +3685,34 @@
"Microsoft.Azure.Cosmos.CosmosSerializer;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {
"Microsoft.Azure.Cosmos.CosmosLinqSerializer;Microsoft.Azure.Cosmos.CosmosSerializer;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Subclasses": {
"Microsoft.Azure.Cosmos.CosmosSystemTextJsonSerializer;Microsoft.Azure.Cosmos.CosmosLinqSerializer;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
"System.IO.Stream ToStream[T](T)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.IO.Stream ToStream[T](T);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"System.String SerializeMemberName(System.Reflection.MemberInfo)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.String SerializeMemberName(System.Reflection.MemberInfo);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"T FromStream[T](System.IO.Stream)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "T FromStream[T](System.IO.Stream);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"Void .ctor(System.Text.Json.JsonSerializerOptions)": {
"Type": "Constructor",
"Attributes": [],
"MethodInfo": "[Void .ctor(System.Text.Json.JsonSerializerOptions), Void .ctor(System.Text.Json.JsonSerializerOptions)]"
}
},
"NestedTypes": {}
}
},
"Members": {
"System.String SerializeMemberName(System.Reflection.MemberInfo)": {
"Type": "Method",
Expand All @@ -3667,6 +3721,32 @@
}
},
"NestedTypes": {}
},
"Microsoft.Azure.Cosmos.CosmosSystemTextJsonSerializer;Microsoft.Azure.Cosmos.CosmosLinqSerializer;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
"System.IO.Stream ToStream[T](T)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.IO.Stream ToStream[T](T);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"System.String SerializeMemberName(System.Reflection.MemberInfo)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.String SerializeMemberName(System.Reflection.MemberInfo);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"T FromStream[T](System.IO.Stream)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "T FromStream[T](System.IO.Stream);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"Void .ctor(System.Text.Json.JsonSerializerOptions)": {
"Type": "Constructor",
"Attributes": [],
"MethodInfo": "[Void .ctor(System.Text.Json.JsonSerializerOptions), Void .ctor(System.Text.Json.JsonSerializerOptions)]"
}
},
"NestedTypes": {}
}
},
"Members": {
Expand All @@ -3683,6 +3763,32 @@
},
"NestedTypes": {}
},
"Microsoft.Azure.Cosmos.CosmosSystemTextJsonSerializer;Microsoft.Azure.Cosmos.CosmosLinqSerializer;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
"System.IO.Stream ToStream[T](T)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.IO.Stream ToStream[T](T);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"System.String SerializeMemberName(System.Reflection.MemberInfo)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "System.String SerializeMemberName(System.Reflection.MemberInfo);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"T FromStream[T](System.IO.Stream)": {
"Type": "Method",
"Attributes": [],
"MethodInfo": "T FromStream[T](System.IO.Stream);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:True;IsConstructor:False;IsFinal:False;"
},
"Void .ctor(System.Text.Json.JsonSerializerOptions)": {
"Type": "Constructor",
"Attributes": [],
"MethodInfo": "[Void .ctor(System.Text.Json.JsonSerializerOptions), Void .ctor(System.Text.Json.JsonSerializerOptions)]"
}
},
"NestedTypes": {}
},
"Microsoft.Azure.Cosmos.CosmosThresholdOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
Expand Down
Loading