yaml_fp
parse_yaml(yaml_str, error_if_empty=False)
¶
Parse a string as yaml.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
yaml_str |
str
|
The string to parse. |
required |
error_if_empty |
bool
|
The parser may throw an error if |
False
|
Returns:
Type | Description |
---|---|
OneOf[Issue, Any]
|
A |
Source code in m/core/yaml_fp.py
read_yson(filename, error_if_empty=False)
¶
Read a json object from a json or yaml file.
It will choose the parser based on the filename extension.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename |
str
|
The filename to read from, if |
required |
error_if_empty |
bool
|
The json parser may throw an error if |
False
|
Returns:
Type | Description |
---|---|
OneOf[Issue, Any]
|
A |