PropertiesParser constructor
PropertiesParser()
A parser for Java-style properties files.
Supports key=value pairs, comments (# and !), line continuations (), and nested properties using dot notation. Preserves special property values like #{} and @{} for later resolution.
Example usage:
void main() {
final parser = PropertiesParser();
final config = parser.parse('host=localhost\nport=8080');
print(config['host']); // Output: localhost
final config = parser.parseAsset(asset);
print(config['host']); // Output: localhost
final config = parser.parseFile('config.properties');
print(config['host']); // Output: localhost
}
Implementation
PropertiesParser();