Convert JSON Configuration to .properties Format
Transform nested JSON configuration objects into flat .properties format with dot-notation keys for Java application compatibility.
Detailed Explanation
JSON to Properties Conversion
The reverse direction—converting JSON to .properties—is useful when you have configuration in JSON format (from Node.js, cloud services, or APIs) and need to produce a Java-compatible properties file.
Example JSON Input
{
"server": {
"port": 8080,
"host": "0.0.0.0",
"ssl": {
"enabled": true,
"keyStore": "/etc/ssl/keystore.jks"
}
},
"database": {
"url": "jdbc:postgresql://localhost:5432/mydb",
"pool": {
"maxSize": 20,
"minIdle": 5,
"timeout": 30000
}
},
"features": ["auth", "cache", "logging"]
}
Properties Output
server.port=8080
server.host=0.0.0.0
server.ssl.enabled=true
server.ssl.keyStore=/etc/ssl/keystore.jks
database.url=jdbc:postgresql://localhost:5432/mydb
database.pool.maxSize=20
database.pool.minIdle=5
database.pool.timeout=30000
features[0]=auth
features[1]=cache
features[2]=logging
How Flattening Works
- Nested objects are flattened using dot notation:
server.ssl.enabled - Arrays use bracket notation:
features[0],features[1] - All values are converted to strings (Java properties are always strings)
- Boolean and number JSON values become their string representation
- Null values become empty strings
- Special characters in keys (
=,:, spaces) are properly escaped
Round-Trip Considerations
Converting JSON → Properties → JSON (nested) will generally reproduce the original structure, but with all values as strings. Number and boolean types are re-inferred during the Properties → JSON direction.
Use Case
Converting JSON configuration from Node.js applications, cloud provider exports (AWS, GCP), or REST API responses into Java .properties format for Spring Boot or other Java applications.
Try It — Properties \u2194 JSON Converter
Related Topics
Nested vs Flat Key Conversion for Properties Files
Conversion Modes
Convert Spring Boot application.properties to JSON
Spring Boot
Database Connection Properties to JSON
Infrastructure
Properties Multi-line Values to JSON
Syntax Features
Properties Special Character Escaping in JSON Conversion
Syntax Features