Class JsonBooleanConverter
Converts a boolean value to or from JSON, always converting a boolean like value (like 1
or 0
) to a boolean.
Inheritance
System.Object
System.Text.Json.Serialization.JsonConverter
System.Text.Json.Serialization.JsonConverter <System.Boolean >
Namespace: Umbraco.Cms.Infrastructure.Serialization
Assembly: Umbraco.Infrastructure.dll
Syntax
public sealed class JsonBooleanConverter : JsonConverter<bool>
Methods
View SourceRead(ref Utf8JsonReader, Type, JsonSerializerOptions)
Declaration
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
reader | |
Type | typeToConvert | |
System. |
options |
Returns
Type | Description |
---|---|
System. |
Write(Utf8JsonWriter, Boolean, JsonSerializerOptions)
Declaration
public override void Write(Utf8JsonWriter writer, bool value, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
writer | |
System. |
value | |
System. |
options |