# IPEndPointJsonConverter Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.serialization.ipendpointjsonconverter/)

## Read(Utf8JsonReader, Type, JsonSerializerOptions) {#read-ref-system-text-json-utf8jsonreader-system-type-system-text-json-jsonserial-d6752eb6}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.serialization.ipendpointjsonconverter/methods/read-ref-system-text-json-utf8jsonreader-system-type-system-text-json-jsonserial-d6752eb6/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/Serialization/SystemTextJson/IPEndPointJsonConverter.cs#L20)

```csharp
public override IPEndPoint? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
```

Reads and converts the JSON to type `T`.

### Parameters

- `reader` (`Utf8JsonReader`): The reader.
- `typeToConvert` (`Type`): The type to convert.
- `options` (`JsonSerializerOptions`): An object that specifies serialization options to use.

### Returns

The converted value.

## ReadAsPropertyName(Utf8JsonReader, Type, JsonSerializerOptions) {#readaspropertyname-ref-system-text-json-utf8jsonreader-system-type-system-text-j-7e41efbf}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.serialization.ipendpointjsonconverter/methods/readaspropertyname-ref-system-text-json-utf8jsonreader-system-type-system-text-j-7e41efbf/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/Serialization/SystemTextJson/IPEndPointJsonConverter.cs#L33)

```csharp
public override IPEndPoint ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
```

Reads a dictionary key from a JSON property name.

### Parameters

- `reader` (`Utf8JsonReader`): The `System.Text.Json.Utf8JsonReader` to read from.
- `typeToConvert` (`Type`): The type to convert.
- `options` (`JsonSerializerOptions`): The options to use when reading the value.

### Returns

The value that was converted.

## Write(Utf8JsonWriter, IPEndPoint, JsonSerializerOptions) {#write-system-text-json-utf8jsonwriter-system-net-ipendpoint-system-text-json-jso-72ac9944}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.serialization.ipendpointjsonconverter/methods/write-system-text-json-utf8jsonwriter-system-net-ipendpoint-system-text-json-jso-72ac9944/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/Serialization/SystemTextJson/IPEndPointJsonConverter.cs#L26-L29)

```csharp
public override void Write(Utf8JsonWriter writer, IPEndPoint value, JsonSerializerOptions options)
```

Writes a specified value as JSON.

### Parameters

- `writer` (`Utf8JsonWriter`): The writer to write to.
- `value` (`IPEndPoint`): The value to convert to JSON.
- `options` (`JsonSerializerOptions`): An object that specifies serialization options to use.

### Exceptions

- `System.ArgumentNullException`: `writer` or `value` is `null`.

## WriteAsPropertyName(Utf8JsonWriter, IPEndPoint, JsonSerializerOptions) {#writeaspropertyname-system-text-json-utf8jsonwriter-system-net-ipendpoint-system-27dd2fde}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.serialization.ipendpointjsonconverter/methods/writeaspropertyname-system-text-json-utf8jsonwriter-system-net-ipendpoint-system-27dd2fde/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Core/Serialization/SystemTextJson/IPEndPointJsonConverter.cs#L62-L65)

```csharp
public override void WriteAsPropertyName(Utf8JsonWriter writer, IPEndPoint value, JsonSerializerOptions options)
```

Writes a dictionary key as a JSON property name.

### Parameters

- `writer` (`Utf8JsonWriter`): The `System.Text.Json.Utf8JsonWriter` to write to.
- `value` (`IPEndPoint`): The value to convert. The value of `System.Text.Json.Serialization.JsonConverter-1.HandleNull` determines if the converter handles `null` values.
- `options` (`JsonSerializerOptions`): The options to use when writing the value.

### Exceptions

- `System.ArgumentNullException`: `writer` or `value` is `null`.
