コンテンツへスキップ
uencoder

INI ファイル 整形 ガイド

リファレンス 用 the INI 設定 ファイル 整形 付き sections, 鍵, 値, および comments.

Structure

INI files organize settings into sections marked by [section] headers. Each section contains key=value pairs. Comments start with ; or # characters. Values may be quoted to preserve whitespace. The format is not formally standardized, leading to parser differences in multiline values, nesting, and type interpretation. Despite this, INI remains widely used for simple configuration.

sections
Bracketed headers
[database]
key=value
Settings pairs
port = 5432
comments
; or # prefix
; comment

Parser Differences

Some parsers support nested sections using dot notation or indentation. Multiline values may use continuation characters or indentation, but support varies. Type handling differs: some parsers return all values as strings, others infer types. Libraries like Python configparser and Node ini have different feature sets. For portability, avoid advanced features and keep values simple.

nesting
Varies by parser
dot or indent
multiline
Not universally supported
continuation chars
types
Often string-only
manual conversion

関連ツール

参考链接