mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
json5 support
This commit is contained in:
1 parent
67e1e10256
commit
9113e9fa36
2 files changed
+3
-1
No files matched your search
@@ -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<Dictionary<string, string>>(jsonContent);
|
||||
if (JsoncParser.Parse(jsonContent) is not Dictionary<string, string> jsonDictionary) continue;
|
||||
|
||||
if (jsonDictionary.TryGetValue("LanguageID", out string languageIdObj) && int.TryParse(languageIdObj, out int languageId))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user