From c97bd7054e9afb09ad069aa708e017f341748da3 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Sat, 8 Aug 2020 21:39:40 +0200 Subject: [PATCH] JSON: Write all exports in metadata file --- Il2CppInspector.Common/Outputs/JSONMetadata.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Il2CppInspector.Common/Outputs/JSONMetadata.cs b/Il2CppInspector.Common/Outputs/JSONMetadata.cs index eb4a959..b9c2dfd 100644 --- a/Il2CppInspector.Common/Outputs/JSONMetadata.cs +++ b/Il2CppInspector.Common/Outputs/JSONMetadata.cs @@ -38,6 +38,7 @@ namespace Il2CppInspector.Outputs writeUsages(); writeFunctions(); writeMetadata(); + writeExports(); }, "Address map of methods, internal functions, type pointers and string literals in the binary file" ); @@ -174,6 +175,16 @@ namespace Il2CppInspector.Outputs }, "IL2CPP Function Metadata"); } + private void writeExports() { + var exports = model.Package.Binary.GetAPIExports(); + + writeArray("exports", () => { + foreach (var export in exports) { + writeObject(() => writeName(export.Value, export.Key)); + } + }, "Exports"); + } + private void writeObject(Action objectWriter) => writeObject(null, objectWriter); private void writeObject(string name, Action objectWriter, string description = null) {