Last active
March 21, 2018 13:54
-
-
Save TheBigAleski/a442e27a9ee1b241d3c38c517a49677c to your computer and use it in GitHub Desktop.
Manifest to JSONObject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSONObject json = new JSONObject(); | |
Manifest mf = new Manifest(); | |
mf.read(Thread.currentThread().getContextClassLoader().getResourceAsStream("META-INF/MANIFEST.MF")); | |
for (Map.Entry<Object, Object> entry:mf.getMainAttributes().entrySet()) { | |
json.put(entry.getKey().toString(), entry.getValue()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment