> ## Documentation Index
> Fetch the complete documentation index at: https://dotnetdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NavigationPageConverter

> Handles JSON conversion for navigation page items that can be either strings or GroupConfig objects.

## Definition

**Assembly:** Mintlify.Core.dll

**Namespace:** Mintlify.Core.Converters

**Inheritance:** System.Text.Json.Serialization.JsonConverter\<object>

## Syntax

```csharp theme={"dark"}
Mintlify.Core.Converters.NavigationPageConverter
```

## Summary

Handles JSON conversion for navigation page items that can be either strings or GroupConfig objects.

## Remarks

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

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

#### Syntax

```csharp theme={"dark"}
public NavigationPageConverter()
```

## Methods

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> CanConvert <Badge color="blue">Override</Badge>

Determines whether the specified type can be converted by this converter.

#### Syntax

```csharp theme={"dark"}
public override bool CanConvert(System.Type typeToConvert)
```

#### Parameters

| Name            | Type          | Description          |
| --------------- | ------------- | -------------------- |
| `typeToConvert` | `System.Type` | The type to convert. |

#### Returns

Type: `bool`
True if the type is object; otherwise, false.

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Read <Badge color="blue">Override</Badge>

Reads and converts the JSON to a navigation page object.

#### Syntax

```csharp theme={"dark"}
public override object Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
```

#### Parameters

| Name            | Type                                     | Description             |
| --------------- | ---------------------------------------- | ----------------------- |
| `reader`        | `System.Text.Json.Utf8JsonReader`        | The JSON reader.        |
| `typeToConvert` | `System.Type`                            | The type to convert to. |
| `options`       | `System.Text.Json.JsonSerializerOptions` | The serializer options. |

#### Returns

Type: `object?`
A string for page paths or a GroupConfig for nested navigation groups.

#### Exceptions

| Exception       | Description                                       |
| --------------- | ------------------------------------------------- |
| `JsonException` | Thrown when the JSON token type is not supported. |

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Write <Badge color="blue">Override</Badge>

Writes the navigation page object to JSON.

#### Syntax

```csharp theme={"dark"}
public override void Write(System.Text.Json.Utf8JsonWriter writer, object value, System.Text.Json.JsonSerializerOptions options)
```

#### Parameters

| Name      | Type                                     | Description             |
| --------- | ---------------------------------------- | ----------------------- |
| `writer`  | `System.Text.Json.Utf8JsonWriter`        | The JSON writer.        |
| `value`   | `object`                                 | The value to write.     |
| `options` | `System.Text.Json.JsonSerializerOptions` | The serializer options. |

#### Exceptions

| Exception       | Description                                  |
| --------------- | -------------------------------------------- |
| `JsonException` | Thrown when the value type is not supported. |
