Convert ENV to PROPERTIES
Turn ENV files into PROPERTIES. Each value becomes one key=value line with Java escapes, under its path of keys joined with dots and list positions in brackets, such as server.hosts[0], and a top-level list is written under items, such as items[0].name.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop ENV files on the dialor turn it to pick what to do
Dotenv settings as a Java properties file.Each value becomes one key=value line, ready for Java code that reads properties.
What you get
One PROPERTIES file. Every value from the ENV file is written as its own key=value line, with Java escapes applied to the text.
Each key is the path of keys that leads to the value, joined with dots. List positions go in brackets, such as server.hosts[0].
Lists and empty values
A top-level list is written under items, so a first entry with a name appears as items[0].name.
An empty object or an empty list is written as JSON text on its line, so the key is still there.
Going the other way
To turn a properties file back into KEY=value lines, use PROPERTIES to ENV. The other ENV conversions are listed under every ENV conversion.
ENV and PROPERTIES.What each format is.
The formats
Dotenv
KEY=value lines that hold environment variables for an app.
- Extensions
- .env
- MIME type
- text
/x -env - Kind
- Text and data
Java Properties
Key and value pairs in the Java properties format.
- Extensions
- .properties
- MIME type
- text
/x -java -properties - Kind
- Text and data
In your code.The same ENV to PROPERTIES conversion through the API, for your app or your agent.
$ cv convert report.env report.properties$ cv convert report.env report.propertiesQuestions.What people ask about ENV to PROPERTIES.
The keys on the path to a value are joined with dots. List positions are written in brackets, as in server.hosts[0].
It is written under items. A field called name in the first entry becomes items[0].name.
It is written as JSON text on its line.
You get one file.