---
title: 'encoding/yaml'
---
yaml provides functions for working with yaml data
## Index
* [def dumps(obj) string](#def-iyamlibdumpsb)
* [def loads(source) object](#def-iyamlibloadsb)
## Functions
#### def yaml.dumps
```go
yaml.dumps(obj) string
```
serialize obj to a yaml string
###### Arguments
| name | type | description |
|------|------|-------------|
| `obj` | `object` | input object |
#### def yaml.loads
```go
yaml.loads(source) object
```
read a source yaml string to a starlark object
###### Arguments
| name | type | description |
|------|------|-------------|
| `source` | `string` | input string of yaml data |