net.jangaroo.apprunner.util.AppManifestDeSerializer Maven / Gradle / Ivy
package net.jangaroo.apprunner.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Map;
public class AppManifestDeSerializer {
public static Map readAppManifest(InputStream appManifestSource) throws IOException {
//noinspection unchecked
return new ObjectMapper().readValue(appManifestSource, Map.class);
}
public static void writeAppManifest(OutputStream output, Map appManifest) throws IOException {
new ObjectMapper().writerWithDefaultPrettyPrinter().writeValue(new PrintWriter(output), appManifest);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy