first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using System;
using Newtonsoft.Json;
using NitroxModel.DataStructures;
namespace NitroxServer.Serialization.Json
{
public class NitroxIdConverter : JsonConverter<NitroxId>
{
public override void WriteJson(JsonWriter writer, NitroxId value, JsonSerializer serializer)
{
writer.WriteValue(value.ToString());
}
public override NitroxId ReadJson(JsonReader reader, Type objectType, NitroxId existingValue, bool hasExistingValue, JsonSerializer serializer)
{
return reader.Value == null ? null : new NitroxId((string)reader.Value);
}
}
}