SerializerExtensions class¶
Defined in
Namespace: Akavache.SystemTextJson Assembly: Akavache.SystemTextJson.Bson.dll Full name: Akavache.SystemTextJson.SerializerExtensions Modifiers: public static
Summary¶
View source (opens in a new tab)
Extension methods that expose the AOT-safe JsonTypeInfo (opens in a new tab) overloads of ISerializer from the System.Text.Json-backed serializers without pulling System.Text.Json into Akavache.Core.
Applies to
net11.0, net11.0-maccatalyst27.2, net11.0-windows10.0.19041, net11.0-android37.0, net11.0-macos27.2, net11.0-ios27.2, net10.0, net10.0-windows10.0.19041, net10.0-maccatalyst26.0, net10.0-android36.0, net10.0-ios26.0, net10.0-macos26.0, net471, net47, net472, net48, net481
Remarks¶
These extensions dispatch to the concrete SystemJsonSerializer or SystemJsonBsonSerializer instance when the runtime ISerializer is backed by one of them. For every other serializer implementation (for example the Newtonsoft-backed ones) they throw NotSupportedException (opens in a new tab) — those serializers can still be used via the non-typed [Deserialize][M:Akavache.ISerializer.Deserialize--1(System.Byte[])] / Serialize overloads.
This indirection keeps Akavache.Core free of a hard dependency on System.Text.Json, so Newtonsoft-only consumers do not transitively pull it in. Callers that need AOT-safe serialization add the Akavache.SystemTextJson.Bson package reference (which transitively brings in Akavache.SystemTextJson) and import this namespace.
Methods¶
| Name | Summary |
|---|---|
| static Deserialize | |
| static Serialize |
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)
Extension blocks¶
extension(ISerializer serializer)¶
DeserializeSerialize