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

# ContextualOptionConverter

> Converts a contextual option that can be a built-in name or a custom object.

## Definition

**Assembly:** Mintlify.Core.dll

**Namespace:** Mintlify.Core.Converters

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

## Syntax

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

## Summary

Converts a contextual option that can be a built-in name or a custom object.

## Constructors

### &#x20;.ctor

#### Syntax

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

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

```csharp theme={"dark"}
protected internal JsonConverter()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

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

## Properties

### &#x20;HandleNull Inherited Virtual

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

```csharp theme={"dark"}
public virtual bool HandleNull { get; }
```

#### Property Value

Type: `bool`

### &#x20;Type Override

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

```csharp theme={"dark"}
public override sealed System.Type Type { get; }
```

#### Property Value

Type: `System.Type`

### &#x20;Type Inherited Abstract

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter`

#### Syntax

```csharp theme={"dark"}
public abstract System.Type Type { get; }
```

#### Property Value

Type: `System.Type?`

## Methods

### &#x20;CanConvert Override

#### Syntax

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

#### Parameters

| Name | Type | Description |
| - | - | - |
| `typeToConvert` | `System.Type` | - |

#### Returns

Type: `bool`

### &#x20;CanConvert Override

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

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

#### Parameters

| Name | Type | Description |
| - | - | - |
| `typeToConvert` | `System.Type` | - |

#### Returns

Type: `bool`

### &#x20;CanConvert Inherited Abstract

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter`

#### Syntax

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

#### Parameters

| Name | Type | Description |
| - | - | - |
| `typeToConvert` | `System.Type` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;Read Override

#### 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` | - |
| `typeToConvert` | `System.Type` | - |
| `options` | `System.Text.Json.JsonSerializerOptions` | - |

#### Returns

Type: `object?`

### &#x20;Read Inherited Abstract

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

```csharp theme={"dark"}
public abstract 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` | - |
| `typeToConvert` | `System.Type` | - |
| `options` | `System.Text.Json.JsonSerializerOptions` | - |

#### Returns

Type: `object?`

### &#x20;ReadAsPropertyName Inherited Virtual

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

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

#### Parameters

| Name | Type | Description |
| - | - | - |
| `reader` | `System.Text.Json.Utf8JsonReader` | - |
| `typeToConvert` | `System.Type` | - |
| `options` | `System.Text.Json.JsonSerializerOptions` | - |

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

### &#x20;Write Override

#### 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` | - |
| `value` | `object` | - |
| `options` | `System.Text.Json.JsonSerializerOptions` | - |

### &#x20;Write Inherited Abstract

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

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

#### Parameters

| Name | Type | Description |
| - | - | - |
| `writer` | `System.Text.Json.Utf8JsonWriter` | - |
| `value` | `object` | - |
| `options` | `System.Text.Json.JsonSerializerOptions` | - |

### &#x20;WriteAsPropertyName Inherited Virtual

> [!NOTE]
>
> Inherited from `System.Text.Json.Serialization.JsonConverter<object>`

#### Syntax

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

#### Parameters

| Name | Type | Description |
| - | - | - |
| `writer` | `System.Text.Json.Utf8JsonWriter` | - |
| `value` | `object` | - |
| `options` | `System.Text.Json.JsonSerializerOptions` | - |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.