Documentation Index Fetch the complete documentation index at: https://dotnetdocs.com/llms.txt
Use this file to discover all available pages before exploring further.
Definition
Assembly: Mintlify.Core.dll
Namespace: Mintlify.Core.Converters
Inheritance: System.Text.Json.Serialization.JsonConverter<object>
Syntax
Mintlify . Core . Converters . NavigationPageConverter
Summary
Handles JSON conversion for navigation page items that can be either strings or GroupConfig objects.
This converter is used for polymorphic navigation page properties in Mintlify configuration objects.
It properly deserializes JSON into strongly-typed objects instead of JsonElement instances.
Constructors
.ctor
Syntax
public NavigationPageConverter ()
Methods
CanConvert Override
Determines whether the specified type can be converted by this converter.
Syntax
public override bool CanConvert ( System . Type typeToConvert )
Parameters
Name Type Description typeToConvertSystem.TypeThe type to convert.
Returns
Type: bool
True if the type is object; otherwise, false.
Read Override
Reads and converts the JSON to a navigation page object.
Syntax
public override object Read ( ref System . Text . Json . Utf8JsonReader reader , System . Type typeToConvert , System . Text . Json . JsonSerializerOptions options )
Parameters
Name Type Description readerSystem.Text.Json.Utf8JsonReaderThe JSON reader. typeToConvertSystem.TypeThe type to convert to. optionsSystem.Text.Json.JsonSerializerOptionsThe serializer options.
Returns
Type: object?
A string for page paths or a GroupConfig for nested navigation groups.
Exceptions
Exception Description JsonExceptionThrown when the JSON token type is not supported.
Write Override
Writes the navigation page object to JSON.
Syntax
public override void Write ( System . Text . Json . Utf8JsonWriter writer , object value , System . Text . Json . JsonSerializerOptions options )
Parameters
Name Type Description writerSystem.Text.Json.Utf8JsonWriterThe JSON writer. valueobjectThe value to write. optionsSystem.Text.Json.JsonSerializerOptionsThe serializer options.
Exceptions
Exception Description JsonExceptionThrown when the value type is not supported.