Fixes TypeInfoResolver Exception

This commit is contained in:
DHR60 2025-07-26 10:40:07 +08:00
parent fe4710a8fd
commit 4367f02a74
2 changed files with 5 additions and 5 deletions

View file

@ -117,7 +117,7 @@ public class CoreConfigSingboxService
} }
} }
} }
ret.Data = customConfigNode.ToJsonString(new() { WriteIndented = true }); ret.Data = JsonUtils.Serialize(customConfigNode);
} }
} }
else else
@ -512,7 +512,7 @@ public class CoreConfigSingboxService
} }
} }
} }
ret.Data = customConfigNode.ToJsonString(new() { WriteIndented = true }); ret.Data = JsonUtils.Serialize(customConfigNode);
} }
} }
else else

View file

@ -95,7 +95,7 @@ public class CoreConfigV2rayService
} }
} }
} }
ret.Data = customConfigNode.ToJsonString(new() { WriteIndented = true }); ret.Data = JsonUtils.Serialize(customConfigNode);
} }
} }
else else
@ -299,7 +299,7 @@ public class CoreConfigV2rayService
} }
} }
} }
ret.Data = customConfigNode.ToJsonString(new() { WriteIndented = true }); ret.Data = JsonUtils.Serialize(customConfigNode);
} }
} }
else else
@ -1570,7 +1570,7 @@ public class CoreConfigV2rayService
await GenDnsDomainsCompatible(node, obj, item); await GenDnsDomainsCompatible(node, obj, item);
v2rayConfig.dns = JsonUtils.Deserialize<Dns4Ray>(obj.ToJsonString()); v2rayConfig.dns = JsonUtils.Deserialize<Dns4Ray>(JsonUtils.Serialize(obj));
} }
catch (Exception ex) catch (Exception ex)
{ {