Update readme

This commit is contained in:
2023-03-17 04:55:34 +08:00
parent 3940c169da
commit c4bf4c8be9

View File

@@ -41,7 +41,8 @@ KEY=VALUE
### 等效 JSON ### 等效 JSON
```ini ```ini
; 下列的 parameter 没有写明 section会自动创建一个名为 _default 的 section ; 下列的 parameter 没有写明 section
; 本库的处理方法是:自动创建一个名为 _default 的 section
targetFps=10 targetFps=10
[mount] [mount]
root=card0 root=card0
@@ -53,15 +54,15 @@ ext=k3v
```json ```json
{ {
"default": { "_default": {
"targetFps": "10" "targetFps": "10"
}, },
"mount": { "mount": {
"root": "card0" "root": "card0"
}, },
"file": { "file": {
"ext": "k3v" "ext": "k3v"
} }
} }
``` ```
@@ -95,7 +96,7 @@ for (i = 0; i < iniResult->numSection; ++i) {
PineIniSection* section = iniResult->sections[i]; PineIniSection* section = iniResult->sections[i];
/* 打印 Section 的 Parameter 数量 */ /* 打印 Section 的 Parameter 数量 */
printf("<%s> %d Parameters\n", section->name, section->numParam); printf("<%s> %d Parameters\n", section->name, section->numParam);
/* 打印 Section 的所有 Parameter */ /* 打印 Section 的所有 Parameter */