Skip to content

ServiceNow.Core

SNow.Core.Utils.JsonConverterOptions

JsonConverterOptions.CustomBooleanConverter Class

Handle Boolean Conversion for: true, yes and 1 values as TRUE false, no and 0 values as FALSE

csharp
public class JsonConverterOptions.CustomBooleanConverter : System.Text.Json.Serialization.JsonConverter<bool>

Inheritance System.Object 🡒 System.Text.Json.Serialization.JsonConverter 🡒 System.Text.Json.Serialization.JsonConverter<System.Boolean> 🡒 CustomBooleanConverter

Constructors
CustomBooleanConverter(BooleanFormat)Handle how boolean are (des)serialized.
Methods
Read(Utf8JsonReader, Type, JsonSerializerOptions)
Write(Utf8JsonWriter, bool, JsonSerializerOptions)

Released under the MIT License.