mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
18 lines
529 B
C#
18 lines
529 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace AssetRipper.GUI.Web.Paths;
|
|
|
|
public readonly record struct AssetPath([property: JsonPropertyName("C")] CollectionPath CollectionPath, [property: JsonPropertyName("D")] long PathID) : IPath<AssetPath>
|
|
{
|
|
public string ToJson()
|
|
{
|
|
return JsonSerializer.Serialize(this, PathSerializerContext.Default.AssetPath);
|
|
}
|
|
|
|
public static AssetPath FromJson(string json)
|
|
{
|
|
return JsonSerializer.Deserialize(json, PathSerializerContext.Default.AssetPath);
|
|
}
|
|
}
|