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
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn 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
writerUtf8JsonWriterThe writer to write to.
valueAccessRuleConfigurationThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.