Table of Contents

Class AccessRuleConfigurationConverter

Namespace
Cloudflare.NET.Security.Firewall.Models
Assembly
Cloudflare.NET.dll

Custom JSON converter for deserializing the polymorphic AccessRuleConfiguration.

public class AccessRuleConfigurationConverter : JsonConverter<AccessRuleConfiguration>
Inheritance
AccessRuleConfigurationConverter
Inherited Members

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type AccessRuleConfiguration.

public override AccessRuleConfiguration Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An object that specifies serialization options to use.

Returns

AccessRuleConfiguration

The converted value.

Write(Utf8JsonWriter, AccessRuleConfiguration, JsonSerializerOptions)

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, AccessRuleConfiguration value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

value AccessRuleConfiguration

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.