1
1
mirror of https://github.com/mcuadros/ascode synced 2024-11-26 14:03:49 +01:00
ascode/_documentation/runtime/yaml.md

45 lines
688 B
Markdown
Raw Normal View History

2019-07-11 18:45:42 +02:00
---
title: 'encoding/yaml'
---
yaml provides functions for working with yaml data
## Index
* [def <b>dumps</b>(obj) string](#def-iyamlibdumpsb)
* [def <b>loads</b>(source) object](#def-iyamlibloadsb)
2019-07-11 18:45:42 +02:00
## Functions
#### def <i>yaml</i>.<b>dumps</b>
2019-07-11 18:45:42 +02:00
```go
yaml.dumps(obj) string
2019-07-11 18:45:42 +02:00
```
serialize obj to a yaml string
###### Arguments
2019-07-11 18:45:42 +02:00
| name | type | description |
|------|------|-------------|
| `obj` | `object` | input object |
2019-07-11 18:45:42 +02:00
#### def <i>yaml</i>.<b>loads</b>
2019-07-11 18:45:42 +02:00
```go
yaml.loads(source) object
2019-07-11 18:45:42 +02:00
```
read a source yaml string to a starlark object
###### Arguments
2019-07-11 18:45:42 +02:00
| name | type | description |
|------|------|-------------|
| `source` | `string` | input string of yaml data |
2019-07-11 18:45:42 +02:00