Replace Newtonsoft.Json with System.Text.Json for MonoBehaviour assets

This commit is contained in:
VaDiM
2026-03-23 19:45:21 +03:00
parent 1eb35015c3
commit e92d96bb08
6 changed files with 9 additions and 17 deletions
-4
View File
@@ -11,10 +11,6 @@
<DebugType>embedded</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AssetStudioUtility\AssetStudioUtility.csproj" />
<ProjectReference Include="..\AssetStudio\AssetStudio.csproj" />
+1 -2
View File
@@ -1,6 +1,5 @@
using AssetStudio;
using AssetStudioCLI.Options;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -143,7 +142,7 @@ namespace AssetStudioCLI
}
if (type != null)
{
var str = JsonConvert.SerializeObject(type, Formatting.Indented);
var str = System.Text.Json.JsonSerializer.Serialize(type, Object.JsonOptions);
File.WriteAllText(exportFullPath, str);
Logger.Debug($"{item.TypeString} \"{item.Text}\" exported to \"{exportFullPath}\"");