# string.toml 库模块帮助文档

## string.toml 成员列表 <a id="string.toml" href="#string.toml">&#x23;</a>

TOML 解析  
注意 TOML 不支持 null 值,转换时会自动清除 null 值

### string.toml.fromJson(json,pretty) <a id="string.toml.fromJson" href="#string.toml.fromJson">&#x23;</a>
JSON 转为 TOML,  
参数与返回值都是字符串，参数 @pretty 指定是否格式化

### string.toml.parse(toml) <a id="string.toml.parse" href="#string.toml.parse">&#x23;</a>
解析 TOML 字符串

### string.toml.stringify(value,pretty) <a id="string.toml.stringify" href="#string.toml.stringify">&#x23;</a>
参数 @1 指定的值转换为 TOML 字符串

### string.toml.stringifyArray(value,pretty) <a id="string.toml.stringifyArray" href="#string.toml.stringifyArray">&#x23;</a>
参数 @1 指定的值作为数组转换为 TOML 字符串

### string.toml.strip(value) <a id="string.toml.strip" href="#string.toml.strip">&#x23;</a>
参数 @1 指定的值转换为 toml 再解析 TOML 并返回解析后的值

### string.toml.toJson(toml,pretty) <a id="string.toml.toJson" href="#string.toml.toJson">&#x23;</a>
TOML 转为 JSON,  
参数与返回值都是字符串，参数 @pretty 指定是否格式化

### string.toml.tryParse(toml) <a id="string.toml.tryParse" href="#string.toml.tryParse">&#x23;</a>
解析 TOML 字符串
