Precedence order among properties file, YAML file, and Command Line arguments in SpringBoot

Spring Boot property resolution property order is described here. Use of application.properties and application.yaml is not expected. Use one format or the other but not both. Whichever one you use will be handled at position 12 or 13 (depending on whether the file is packaged in the application JAR or not) in property precedence order. … Read more

Include jekyll / liquid template data in a YAML variable?

Today I ran into a similar problem. As a solution I created the following simple Jekyll filter-plugin which allows to expand nested liquid-templates in (e.g. liquid-variables in the YAML front matter): module Jekyll module LiquifyFilter def liquify(input) Liquid::Template.parse(input).render(@context) end end end Liquid::Template.register_filter(Jekyll::LiquifyFilter) Filters can be added to a Jekyll site by placing them in the … Read more

How do I convert from YAML to JSON in Java?

Here is an implementation that uses Jackson: String convertYamlToJson(String yaml) { ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory()); Object obj = yamlReader.readValue(yaml, Object.class); ObjectMapper jsonWriter = new ObjectMapper(); return jsonWriter.writeValueAsString(obj); } Requires: compile(‘com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.7.4’)

How can I update a .yml file, ignoring preexisting Jinja syntax, using Python?

The solution in this answer has been incorporated into ruamel.yaml using a plugin mechanism. At the bottom of this post there are quick-and-dirty instructions on how to use that. There are three aspects in updating a YAML file that contains jinja2 “code”: making the jinja2 code acceptable to the YAML parser making sure the acceptable … Read more

PHP YAML Parsers [closed]

Last updated: July 26th, 2017 Here’s a summary of the state of YAML in PHP: Wrappers to C libraries: You’ll probably want these if you need sheer speed: php-yaml: Wrapper for LibYAML. Available as a PECL extension; it is also the one on PHP’s docs. syck: Binding to syck; also available as a PECL extension. … Read more

tech