Convert PROPERTIES to ENV
Turn PROPERTIES files into Dotenv. Each top-level key becomes a KEY=value line, with characters a variable name cannot hold turned into underscores, and a top-level list numbers its entries from 0 under items, so the name of the first entry becomes items_0_name.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop PROPERTIES files on the dialor turn it to pick what to do
Properties turned into a dotenv file.Each key becomes a KEY=value line in one ENV file.
What you get
One ENV file with a KEY=value line for each top-level key. Characters that a variable name cannot hold are turned into underscores, so the names work as environment variable names.
Text with spaces or symbols is double-quoted with escapes. A null value leaves the value empty.
Nested values and lists
Nested objects and lists become quoted JSON text. They stay in one value instead of becoming separate variables.
A top-level list numbers its entries from 0 under items. The name of the first entry becomes items_0_name.
Going the other way
To turn a dotenv file back into properties, use ENV to PROPERTIES.
PROPERTIES and ENV.What each format is.
The formats
Java Properties
Key and value pairs in the Java properties format.
- Extensions
- .properties
- MIME type
- text
/x -java -properties - Kind
- Text and data
Dotenv
KEY=value lines that hold environment variables for an app.
- Extensions
- .env
- MIME type
- text
/x -env - Kind
- Text and data
In your code.The same PROPERTIES to ENV conversion through the API, for your app or your agent.
$ cv convert report.properties report.env$ cv convert report.properties report.envQuestions.What people ask about PROPERTIES to ENV.
Characters a variable name cannot hold are turned into underscores. The rest of the name is kept.
They are double-quoted with escapes.
The value is left empty.
Its entries are numbered from 0 under items. The name of the first entry becomes items_0_name.