FasterXML / FasterXML/jackson-dataformats-text

Allow ENV and Java Props substitutions while reading YAML file

Open
#28 4 comments 3 reactions 0 assignees View on GitHub
yaml
Dominant language
Java
Stars
455
Forks
164
Avg merge
6d 10h
Merged PRs (30d)
2

Description

I'm looking for a feature similar to Spring, HandleBar, etc that would allow me to create a yaml (or any format) file that includes a reference to system variables during read. Having to "pre-process" a file using templating tools before launching an application is cumbersome and error-prone vs having a standard by which variables can be defined by the user (vs the developer) when crafting the files and then merged into the content delivered to the application. I realize the request is "extending" the yaml, json, etc standard but the point of libraries such as Jackson is to help establish new standards.

example:

```
system:
host: ${HOSTNAME:defaulthost}
port: ${PORT:8080}
```
if you wanted to allow the control of the source (System ENV vs Java Property) you could use a syntax as follows.

```
system:
port: ${ENV:PORT:8080}
port: ${PROPERTY:PORT:8080}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.