yaml
Package yaml provides YAML parsing and generation for durable programs.
load("yaml", ...)
yaml
Package yaml provides YAML parsing and generation for durable programs.
load("yaml", "yaml")
Functions
parse(input: String, max_depth: Int?)
Example:
yaml.parse("name: alice\nage: 30\n")
yaml.parse(doc, max_depth=0)
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
input | String | ✓ | |
max_depth | Int |
Returns: Value
parse_all(input: String, max_depth: Int?)
Example:
yaml.parse_all("---\nfoo: 1\n---\nbar: 2\n")
yaml.parse_all(stream, max_depth=0)
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
input | String | ✓ | |
max_depth | Int |
Returns: List
generate(value: Value, max_depth: Int?)
Example:
yaml.generate({"name": "alice", "age": 30})
yaml.generate(value, max_depth=0)
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
value | Value | ✓ | |
max_depth | Int |
Returns: String