Drop dependency on Newtonsoft.Json

This commit is contained in:
Matthias Mailänder
2025-07-14 15:50:06 +02:00
committed by Gustas Kažukauskas
parent 3ca951930e
commit fa5a347d2e
3 changed files with 6 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using Newtonsoft.Json; using System.Text.Json;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.UtilityCommands.Documentation.Objects; using OpenRA.Mods.Common.UtilityCommands.Documentation.Objects;
@@ -97,7 +97,7 @@ namespace OpenRA.Mods.Common.UtilityCommands.Documentation
RelatedEnums = DocumentationHelpers.GetRelatedEnumInfos(relatedEnumTypes) RelatedEnums = DocumentationHelpers.GetRelatedEnumInfos(relatedEnumTypes)
}; };
return JsonConvert.SerializeObject(result); return JsonSerializer.Serialize(result);
} }
} }
} }

View File

@@ -12,7 +12,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Newtonsoft.Json; using System.Text.Json;
using OpenRA.Mods.Common.UtilityCommands.Documentation.Objects; using OpenRA.Mods.Common.UtilityCommands.Documentation.Objects;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.UtilityCommands.Documentation
RelatedEnums = DocumentationHelpers.GetRelatedEnumInfos(relatedEnumTypes) RelatedEnums = DocumentationHelpers.GetRelatedEnumInfos(relatedEnumTypes)
}; };
return JsonConvert.SerializeObject(result); return JsonSerializer.Serialize(result);
} }
static IEnumerable<Type> RequiredTraitTypes(Type t) static IEnumerable<Type> RequiredTraitTypes(Type t)

View File

@@ -12,7 +12,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Newtonsoft.Json; using System.Text.Json;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Mods.Common.UtilityCommands.Documentation.Objects; using OpenRA.Mods.Common.UtilityCommands.Documentation.Objects;
using OpenRA.Primitives; using OpenRA.Primitives;
@@ -79,7 +79,7 @@ namespace OpenRA.Mods.Common.UtilityCommands.Documentation
RelatedEnums = DocumentationHelpers.GetRelatedEnumInfos(relatedEnumTypes) RelatedEnums = DocumentationHelpers.GetRelatedEnumInfos(relatedEnumTypes)
}; };
return JsonConvert.SerializeObject(result); return JsonSerializer.Serialize(result);
} }
} }
} }