List of usage examples for com.fasterxml.jackson.dataformat.yaml YAMLFactory YAMLFactory
public YAMLFactory()
From source file:io.fabric8.kubernetes.client.internal.SerializationUtils.java
public static ObjectMapper getStatelessMapper() { if (statelessMapper == null) { statelessMapper = new ObjectMapper(new YAMLFactory()); statelessMapper.addMixInAnnotations(ObjectMeta.class, ObjectMetaMixIn.class); statelessMapper.addMixInAnnotations(ReplicationController.class, ReplicationControllerMixIn.class); }//from w w w.j ava 2 s . c o m return statelessMapper; }
From source file:com.chiralbehaviors.CoRE.loader.Configuration.java
public static Configuration fromYaml(InputStream yaml) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); return mapper.readValue(yaml, Configuration.class); }
From source file:com.hellblazer.gossip.configuration.YamlHelper.java
public static GossipConfiguration fromYaml(InputStream yaml) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); mapper.registerModule(new GossipModule()); return mapper.readValue(yaml, GossipConfiguration.class); }
From source file:com.chiralBehaviors.slp.hive.configuration.YamlHelper.java
public static EngineConfiguration fromYaml(InputStream yaml) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); mapper.registerModule(new EngineModule()); return mapper.readValue(yaml, EngineConfiguration.class); }
From source file:com.chiralBehaviors.groo.configuration.GrooConfiguration.java
public static GrooConfiguration fromYaml(InputStream yaml) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); mapper.registerModule(new DiscoveryModule()); return mapper.readValue(yaml, GrooConfiguration.class); }
From source file:com.hellblazer.autoconfigure.configuration.YamlHelper.java
public static Configuration fromYaml(InputStream yaml) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); mapper.registerModule(getModule());/*from w ww . j a va 2 s .c o m*/ return mapper.readValue(yaml, Configuration.class); }
From source file:com.chiralBehaviors.autoconfigure.configuration.YamlHelper.java
public static Configuration fromYaml(InputStream yaml) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); mapper.registerModule(new GossipScopeModule()); return mapper.readValue(yaml, Configuration.class); }
From source file:com.fizzed.stork.launcher.ConfigurationFactory.java
static public ObjectMapper createObjectMapper() { // create json deserializer ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); mapper.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES); return mapper; }
From source file:io.coala.config.YamlUtil.java
/** * @return a {@link ObjectMapper} singleton for YAML file formats *///from www . j av a 2s . c om public synchronized static ObjectMapper getYamlMapper() { if (mapper == null) mapper = new ObjectMapper(new YAMLFactory()); return mapper; }
From source file:io.fabric8.kubernetes.client.internal.KubeConfigUtils.java
public static Config parseConfig(File file) throws IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); return mapper.readValue(file, Config.class); }