godot-yaml

An asset by Beliar
The page banner background of a mountain and forest
godot-yaml hero image

Quick Information

0 ratings
godot-yaml icon image
Beliar
godot-yaml

Adds the ability to print and parse variables to and from yaml.Usage:Since this is a godot native plugin, you first need to (pre)load it like this:```yaml = preload("res://addons/godot-yaml/gdyaml.gdns").new()```After this the basic usage is like for JSON:To convert a value to a yaml string you need to use the print method, like this:```var yamlstring = yaml.print(1.0)```The parse method takes a yaml formatted string and tries to convert it into a godot variable. It returns a JSONParseResult.```var value = yaml.parse(yamlstring).result```If it cannot convert the string it will give an error message with information why it could not convert something and the position inside the string where it failed.

Supported Engine Version
3.4
Version String
0.9.3
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

godot-yaml-asset

Godot yaml adds printing and parsing yaml data.

It uses rapidyaml for the basic parsing and specific converters for Godot classes.

Supported classes are printed as either their matching yaml type or, if special handling is necessary, using a yaml tag to identify them as that special type.

Currently it prints and parses all Variant variables except objects and thus currently has the same behaviour as JSON.

Usage:

Since this is a godot native plugin, you first need to (pre)load it like this:

yaml = preload("res://addons/godot-yaml/gdyaml.gdns").new()

After this the basic usage is like for JSON:

To convert a value to a yaml string you need to use the print method, like this:

var yamlstring = yaml.print(1.0)

The parse method takes a yaml formatted string and tries to convert it into a godot variable. It returns a JSONParseResult.

var value = yaml.parse(yamlstring).result

If it cannot convert the string it will give an error message with information why it could not convert something and the position inside the string where it failed.

Source code available here: https://github.com/Beliaar/godot-yaml

Adds the ability to print and parse variables to and from yaml.

Usage:

Since this is a godot native plugin, you first need to (pre)load it like this:

```
yaml = preload("res://addons/godot-yaml/gdyaml.gdns").new()
```

After this the basic usage is like for JSON:

To convert a value to a yaml string you need to use the print method, like this:

```
var yamlstring = yaml.print(1.0)
```

The parse method takes a yaml formatted string and tries to convert it into a godot variable. It returns a JSONParseResult.

```
var value = yaml.parse(yamlstring).result
```

If it cannot convert the string it will give an error message with information why it could not convert something and the position inside the string where it failed.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
godot-yaml icon image
Beliar
godot-yaml

Adds the ability to print and parse variables to and from yaml.Usage:Since this is a godot native plugin, you first need to (pre)load it like this:```yaml = preload("res://addons/godot-yaml/gdyaml.gdns").new()```After this the basic usage is like for JSON:To convert a value to a yaml string you need to use the print method, like this:```var yamlstring = yaml.print(1.0)```The parse method takes a yaml formatted string and tries to convert it into a godot variable. It returns a JSONParseResult.```var value = yaml.parse(yamlstring).result```If it cannot convert the string it will give an error message with information why it could not convert something and the position inside the string where it failed.

Supported Engine Version
3.4
Version String
0.9.3
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers