HtmlForgeX

API Reference

Class

VisNetworkEnumConverter`1

Namespace HtmlForgeX
Assembly HtmlForgeX
Base JsonConverter<T>

JSON converter for VisNetwork enum types that handles proper casing and formatting

Inheritance

  • JsonConverter<T>
  • VisNetworkEnumConverter`1

Type Parameters

T
The enum type to convert

Constructors

public VisNetworkEnumConverter<T>() #

Methods

public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) #
Returns: T

Reads a VisNetwork enum value from JSON.

Parameters

reader System.Text.Json.Utf8JsonReader@ requiredposition: 0
The JSON reader.
typeToConvert System.Type requiredposition: 1
The enum type being converted.
options System.Text.Json.JsonSerializerOptions requiredposition: 2
Serializer options.

Returns

The parsed enum value or default.

public override Void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) #
Returns: Void

Writes a VisNetwork enum value to JSON.

Parameters

writer System.Text.Json.Utf8JsonWriter requiredposition: 0
The JSON writer.
value `0 requiredposition: 1
Value to serialize.
options System.Text.Json.JsonSerializerOptions requiredposition: 2
Serializer options.