Definition

Assembly: Mintlify.Core.dll Namespace: Mintlify.Core.Models Inheritance: System.Text.Json.Serialization.JsonConverter<Mintlify.Core.Models.ColorConfig>

Syntax

Mintlify.Core.Models.ColorConfigJsonConverter

Summary

Custom JSON converter for ColorConfig that supports both string and object formats.

Constructors

.ctor

Syntax

public ColorConfigJsonConverter()

Methods

Read

Reads and converts the JSON to a ColorConfig object.

Syntax

public override Mintlify.Core.Models.ColorConfig Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)

Parameters

NameTypeDescription
readerSystem.Text.Json.Utf8JsonReaderThe JSON reader.
typeToConvertSystem.TypeThe type to convert to.
optionsSystem.Text.Json.JsonSerializerOptionsThe serializer options.

Returns

Type: Mintlify.Core.Models.ColorConfig? A ColorConfig object.

Write

Writes a ColorConfig object as JSON.

Syntax

public override void Write(System.Text.Json.Utf8JsonWriter writer, Mintlify.Core.Models.ColorConfig value, System.Text.Json.JsonSerializerOptions options)

Parameters

NameTypeDescription
writerSystem.Text.Json.Utf8JsonWriterThe JSON writer.
valueMintlify.Core.Models.ColorConfigThe ColorConfig object to write.
optionsSystem.Text.Json.JsonSerializerOptionsThe serializer options.