INI/JSON 转换器
在 INI 和 JSON 配置格式之间转换。将旧配置文件转换为现代 JSON。
INI Format Notes:
- • Sections are denoted with
[section] - • Key-value pairs use
key = value - • Comments start with
;or# - • Values with spaces should be quoted
INI vs JSON - 技术详情
INI 文件使用 [section] 标题和 key=value 对。JSON 使用嵌套对象。在它们之间转换有助于将旧配置迁移到现代格式。
命令行替代方案
// INI format
[database]
host = localhost
port = 5432
// JSON equivalent
{ "database": { "host": "localhost", "port": "5432" } }