diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index a488b9e93..3aec5f0cc 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "modernuoschemagenerator": { - "version": "2.6.0", + "version": "2.6.1", "commands": [ "ModernUOSchemaGenerator" ] diff --git a/Projects/Server/Json/Converters/GuidConverter.cs b/Projects/Server/Json/Converters/GuidConverter.cs index 64a5fb13e..6bd5da8f2 100644 --- a/Projects/Server/Json/Converters/GuidConverter.cs +++ b/Projects/Server/Json/Converters/GuidConverter.cs @@ -21,16 +21,9 @@ namespace Server.Json; public class GuidConverter : JsonConverter { - public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (Guid.TryParse(reader.GetString()!, out var guid)) - { - return guid; - } + public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => + reader.GetGuid(); - throw new JsonException("Guid must be in the correct format"); - } - - public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options) - => writer.WriteStringValue(value.ToString()); + public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options) => + writer.WriteStringValue(value.ToString()); } diff --git a/Projects/Server/Server.csproj b/Projects/Server/Server.csproj index aedf820b8..723038fb9 100755 --- a/Projects/Server/Server.csproj +++ b/Projects/Server/Server.csproj @@ -37,7 +37,7 @@ - + diff --git a/Projects/UOContent/UOContent.csproj b/Projects/UOContent/UOContent.csproj index 65c9aa1ae..c24f8732b 100755 --- a/Projects/UOContent/UOContent.csproj +++ b/Projects/UOContent/UOContent.csproj @@ -38,7 +38,7 @@ - +