1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-27 12:40:06 +08:00
SpaceVim/docs/api/data/toml.md

30 lines
668 B
Markdown
Raw Normal View History

2018-07-13 20:35:27 +08:00
---
title: "data#toml API"
description: "data#toml API provides some basic functions and values for toml."
2018-07-13 20:35:27 +08:00
---
# [Available APIs](../../) >> data#toml
<!-- vim-markdown-toc GFM -->
- [Intro](#intro)
- [functions](#functions)
<!-- vim-markdown-toc -->
## Intro
`data#toml` API provides some functions to manipulate a toml. Here is an example for using this api:
```vim
let s:TOML = SpaceVim#api#import('data#toml')
let json = s:TOML.parse_file('~/.SpaceVim.d/init.toml')
```
## functions
| name | description |
| ------------------ | ----------------- |
| `parse(str)` | parse content |
| `parse_file(path)` | parse a toml file |