diff --git a/EHR.csproj b/EHR.csproj index fa37a85ec..4968180d6 100644 --- a/EHR.csproj +++ b/EHR.csproj @@ -38,6 +38,7 @@ + diff --git a/Modules/Translator.cs b/Modules/Translator.cs index b1698cec7..dfeb6a237 100644 --- a/Modules/Translator.cs +++ b/Modules/Translator.cs @@ -8,6 +8,7 @@ using System.Text; using System.Text.Json; using System.Text.RegularExpressions; using EHR.Gamemodes; +using Global; #if !ANDROID using Il2CppInterop.Runtime.InteropTypes.Arrays; @@ -57,7 +58,7 @@ public static class Translator string jsonContent = reader.ReadToEnd(); // Deserialize the JSON into a dictionary - var jsonDictionary = JsonSerializer.Deserialize>(jsonContent); + if (JsoncParser.Parse(jsonContent) is not Dictionary jsonDictionary) continue; if (jsonDictionary.TryGetValue("LanguageID", out string languageIdObj) && int.TryParse(languageIdObj, out int languageId)) {