SerializationHostingExtensions.AddJsonSerializer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, JsonSerializerOptions) |
Adds support for serializing and deserializing values using JsonSerializer. |
AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, Func<Type,Boolean>, Action<OptionsBuilder<JsonCodecOptions>>) |
Adds support for serializing and deserializing values using JsonSerializer. |
AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, JsonSerializerOptions)
Adds support for serializing and deserializing values using JsonSerializer.
public static Orleans.Serialization.ISerializerBuilder AddJsonSerializer (this Orleans.Serialization.ISerializerBuilder serializerBuilder, Func<Type,bool> isSupported, System.Text.Json.JsonSerializerOptions jsonSerializerOptions = default);
static member AddJsonSerializer : Orleans.Serialization.ISerializerBuilder * Func<Type, bool> * System.Text.Json.JsonSerializerOptions -> Orleans.Serialization.ISerializerBuilder
<Extension()>
Public Function AddJsonSerializer (serializerBuilder As ISerializerBuilder, isSupported As Func(Of Type, Boolean), Optional jsonSerializerOptions As JsonSerializerOptions = Nothing) As ISerializerBuilder
Parameters
- serializerBuilder
- ISerializerBuilder
The serializer builder.
A delegate used to indicate which types should be serialized and copied by this codec.
- jsonSerializerOptions
- JsonSerializerOptions
The JSON serializer options.
Applies to
AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, Func<Type,Boolean>, Action<OptionsBuilder<JsonCodecOptions>>)
Adds support for serializing and deserializing values using JsonSerializer.
public static Orleans.Serialization.ISerializerBuilder AddJsonSerializer (this Orleans.Serialization.ISerializerBuilder serializerBuilder, Func<Type,bool> isSerializable = default, Func<Type,bool> isCopyable = default, Action<Microsoft.Extensions.Options.OptionsBuilder<Orleans.Serialization.JsonCodecOptions>> configureOptions = default);
static member AddJsonSerializer : Orleans.Serialization.ISerializerBuilder * Func<Type, bool> * Func<Type, bool> * Action<Microsoft.Extensions.Options.OptionsBuilder<Orleans.Serialization.JsonCodecOptions>> -> Orleans.Serialization.ISerializerBuilder
<Extension()>
Public Function AddJsonSerializer (serializerBuilder As ISerializerBuilder, Optional isSerializable As Func(Of Type, Boolean) = Nothing, Optional isCopyable As Func(Of Type, Boolean) = Nothing, Optional configureOptions As Action(Of OptionsBuilder(Of JsonCodecOptions)) = Nothing) As ISerializerBuilder
Parameters
- serializerBuilder
- ISerializerBuilder
The serializer builder.
A delegate used to indicate which types should be serialized by this codec.
A delegate used to indicate which types should be copied by this codec.
- configureOptions
- Action<OptionsBuilder<JsonCodecOptions>>
A delegate used to configure the options for the JSON serializer.