Optimzie Newtonsoft.Json lib by removing Xml, Schema support and making it AOT-friendly for AOT game builds
This commit is contained in:
@@ -604,9 +604,7 @@ namespace FlaxEditor.CustomEditors
|
||||
JsonSerializer.Deserialize(obj, text);
|
||||
}
|
||||
}
|
||||
#pragma warning disable 618
|
||||
else if (Newtonsoft.Json.Schema.JsonSchema.Parse(text) == null)
|
||||
#pragma warning restore 618
|
||||
else if (!text.StartsWith("{") || !text.EndsWith("}"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
BIN
Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll
(Stored with Git LFS)
BIN
Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll
(Stored with Git LFS)
Binary file not shown.
BIN
Source/Platforms/DotNet/Newtonsoft.Json.dll
(Stored with Git LFS)
BIN
Source/Platforms/DotNet/Newtonsoft.Json.dll
(Stored with Git LFS)
Binary file not shown.
BIN
Source/Platforms/DotNet/Newtonsoft.Json.pdb
(Stored with Git LFS)
BIN
Source/Platforms/DotNet/Newtonsoft.Json.pdb
(Stored with Git LFS)
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -77,6 +77,10 @@ namespace Flax.Deps.Dependencies
|
||||
|
||||
// AOT build (disabled codegen)
|
||||
Utilities.ReplaceInFile(Path.Combine(root, "Src", "Newtonsoft.Json", "Newtonsoft.Json.csproj"), "HAVE_REFLECTION_EMIT;", ";");
|
||||
Utilities.ReplaceInFile(Path.Combine(root, "Src", "Newtonsoft.Json", "Newtonsoft.Json.csproj"), "HAVE_DYNAMIC;", ";");
|
||||
Utilities.ReplaceInFile(Path.Combine(root, "Src", "Newtonsoft.Json", "Newtonsoft.Json.csproj"), "HAVE_EXPRESSIONS;", ";");
|
||||
Utilities.ReplaceInFile(Path.Combine(root, "Src", "Newtonsoft.Json", "Newtonsoft.Json.csproj"), "HAVE_REGEX;", ";");
|
||||
Utilities.ReplaceInFile(Path.Combine(root, "Src", "Newtonsoft.Json", "Newtonsoft.Json.csproj"), "HAVE_TYPE_DESCRIPTOR;", ";");
|
||||
Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, buildPlatform);
|
||||
foreach (var platform in options.Platforms)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user