Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

YAML.gd

An asset by lowlevel.1989
The page banner background of a mountain and forest
YAML.gd hero image

Quick Information

0 ratings
YAML.gd icon image
lowlevel.1989
YAML.gd

Full documentation available in the repository:https://github.com/lowlevel-1989/YAML.gdA YAML parser written entirely in GDScript.YAML.gd allows you to parse YAML content directly within your projects without requiring C++ modules or compilation, making it easy to integrate and use on any platform supported by Godot.=== Running Basic Tests ===✔️ Test 1: Simple key-value pairs✔️ Test 2: Nested dictionaries✔️ Test 3: Simple lists✔️ Test 4: Mixed structures✔️ Test 5: Empty values➡️ Basic Tests: 5/5 passed=== Running Multiline Tests ===✔️ Test 1: Literal block✔️ Test 2: Folded block✔️ Test 3: Strip chomping✔️ Test 4: Keep chomping✔️ Test 5: Quoted string➡️ Multiline Tests: 5/5 passed=== Running Advanced Tests ===✔️ Test 1: Complex nested structure✔️ Test 2: Multiple levels of nesting✔️ Test 3: Mixed list types✔️ Test 4: Comments and empty lines✔️ Test 5: Miscellaneous edge cases➡️ Advanced Tests: 5/5 passed✅ **ALL TESTS PASSED**

Supported Engine Version
4.0
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
2 days ago
Git URL
Issue URL

README logo

YAML.gd 1.0.0 README Godot v4.x README Godot v3.x

A YAML parser written entirely in GDScript.
YAML.gd allows you to parse YAML content directly within your projects without requiring C++ modules or compilation, making it easy to integrate and use on any platform supported by Godot.

README "Buy Me A Coffee"

Features

  • 100% implemented in GDScript.
  • No compilation needed – just drop it into your project.
  • Supports:
    • Simple and nested dictionaries.
    • Lists and mixed structures (lists within dictionaries and vice versa).
    • Empty/null values.
    • Multiline blocks (|, >).
    • Chomping modifiers (|-, |+) and newline handling.
    • Quoted strings (single and double quotes).
    • Inline comments and blank lines.
    • Automatic type casting (true, false, numbers, null).
  • Fully tested with a comprehensive test suite.

⚠️ Important Warning

Do not edit .yaml files directly from the Godot editor.
The editor may automatically convert spaces to tabs, which breaks YAML syntax (YAML requires indentation using spaces only).

Use an external editor with proper configuration such as:

  • Vim
  • VSCode
  • Sublime Text
  • Notepad++

Make sure "tabs to spaces" is enabled.

Basic usage:

var parser = YAMLParser.new()

var yfile = FileAccess.open(
                "res://assets/yaml_dot_gd/tests/yamls/basic/test_01.yaml",
                FileAccess.READ)
var yaml = yfile.get_as_text()
yfile.close()

var result = parser.parse(yaml)
if typeof(result) == TYPE_DICTIONARY and result.has("name"):
    print(result["name"])

Test Results

=== Running Basic Tests ===
✔️ Test 1: Simple key-value pairs
✔️ Test 2: Nested dictionaries
✔️ Test 3: Simple lists
✔️ Test 4: Mixed structures
✔️ Test 5: Empty values
➡️ Basic Tests: 5/5 passed

=== Running Multiline Tests ===
✔️ Test 1: Literal block
✔️ Test 2: Folded block
✔️ Test 3: Strip chomping
✔️ Test 4: Keep chomping
✔️ Test 5: Quoted string
➡️ Multiline Tests: 5/5 passed

=== Running Advanced Tests ===
✔️ Test 1: Complex nested structure
✔️ Test 2: Multiple levels of nesting
✔️ Test 3: Mixed list types
✔️ Test 4: Comments and empty lines
✔️ Test 5: Miscellaneous edge cases
➡️ Advanced Tests: 5/5 passed

✅ **ALL TESTS PASSED**

Full documentation available in the repository:
https://github.com/lowlevel-1989/YAML.gd

A YAML parser written entirely in GDScript.
YAML.gd allows you to parse YAML content directly within your projects without requiring C++ modules or compilation, making it easy to integrate and use on any platform supported by Godot.

=== Running Basic Tests ===
✔️ Test 1: Simple key-value pairs
✔️ Test 2: Nested dictionaries
✔️ Test 3: Simple lists
✔️ Test 4: Mixed structures
✔️ Test 5: Empty values
➡️ Basic Tests: 5/5 passed

=== Running Multiline Tests ===
✔️ Test 1: Literal block
✔️ Test 2: Folded block
✔️ Test 3: Strip chomping
✔️ Test 4: Keep chomping
✔️ Test 5: Quoted string
➡️ Multiline Tests: 5/5 passed

=== Running Advanced Tests ===
✔️ Test 1: Complex nested structure
✔️ Test 2: Multiple levels of nesting
✔️ Test 3: Mixed list types
✔️ Test 4: Comments and empty lines
✔️ Test 5: Miscellaneous edge cases
➡️ Advanced Tests: 5/5 passed

✅ **ALL TESTS PASSED**

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
YAML.gd icon image
lowlevel.1989
YAML.gd

Full documentation available in the repository:https://github.com/lowlevel-1989/YAML.gdA YAML parser written entirely in GDScript.YAML.gd allows you to parse YAML content directly within your projects without requiring C++ modules or compilation, making it easy to integrate and use on any platform supported by Godot.=== Running Basic Tests ===✔️ Test 1: Simple key-value pairs✔️ Test 2: Nested dictionaries✔️ Test 3: Simple lists✔️ Test 4: Mixed structures✔️ Test 5: Empty values➡️ Basic Tests: 5/5 passed=== Running Multiline Tests ===✔️ Test 1: Literal block✔️ Test 2: Folded block✔️ Test 3: Strip chomping✔️ Test 4: Keep chomping✔️ Test 5: Quoted string➡️ Multiline Tests: 5/5 passed=== Running Advanced Tests ===✔️ Test 1: Complex nested structure✔️ Test 2: Multiple levels of nesting✔️ Test 3: Mixed list types✔️ Test 4: Comments and empty lines✔️ Test 5: Miscellaneous edge cases➡️ Advanced Tests: 5/5 passed✅ **ALL TESTS PASSED**

Supported Engine Version
4.0
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
2 days 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