All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jangaroo.apprunner.util.AppManifestDeSerializer Maven / Gradle / Ivy

There is a newer version: 4.1.17
Show newest version
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