Table of Contents

Class JsonUtil.AssetLocationConverter

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public sealed class JsonUtil.AssetLocationConverter : JsonConverter<AssetLocation>
Inheritance
JsonUtil.AssetLocationConverter
Inherited Members
Extension Methods

Constructors

AssetLocationConverter(string)

public AssetLocationConverter(string domain)

Parameters

domain string

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type AssetLocation.

public override AssetLocation? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An object that specifies serialization options to use.

Returns

AssetLocation

The converted value.

Write(Utf8JsonWriter, AssetLocation, JsonSerializerOptions)

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, AssetLocation value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

value AssetLocation

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.