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
domainstring
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
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn 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
writerUtf8JsonWriterThe writer to write to.
valueAssetLocationThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.