https://github.com/leont/yamlish
An implementation of YAML in Raku
https://github.com/leont/yamlish
raku yaml
Last synced: 11 months ago
JSON representation
An implementation of YAML in Raku
- Host: GitHub
- URL: https://github.com/leont/yamlish
- Owner: Leont
- License: artistic-2.0
- Created: 2015-08-08T19:00:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2025-01-05T22:05:21.000Z (over 1 year ago)
- Last Synced: 2025-06-08T17:41:26.069Z (about 1 year ago)
- Topics: raku, yaml
- Language: Raku
- Homepage:
- Size: 287 KB
- Stars: 22
- Watchers: 6
- Forks: 18
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/Leont/yamlish/actions) [](https://github.com/Leont/yamlish/actions) [](https://github.com/Leont/yamlish/actions)
NAME
====
YAMLish - a YAML parser/emitter written in pure raku
DESCRIPTION
===========
This is a YAML parser written in pure-raku. It aims at being feature complete (though there still a few features left to implement). Patches are welcome.
INSTALLATION
============
```console
$ zef install YAMLish
```
EXPORTED SUBS
=============
* `load-yaml(Str $input, ::Grammar:U :$schema = ::Schema::Core, :%tags)`
* `load-yamls(Str $input, ::Grammar:U :$schema = ::Schema::Core, :%tags)`
* `save-yaml($document, :$sorted = True)`
* `save-yamls(**@documents, :$sorted = True)`
Example use for a configuration file
====================================
This configuration file begins with a comment followed by three lines of key/value:
# key: value
lang: en
lat: 46.12345
lon: -82.6231
Access the file in your code like this:
use YAMLish;
my $str = "config.yml".IO.slurp:
my %conf = load-yaml $str;
say %conf; # OUTPUT: «en»
say %conf; # OUTPUT: «46.12345»
say %conf; # OUTPUT: «-82.6231»
TODO
====
Please have a look at [./TODO.md](./TODO.md)
AUTHOR
======
Leon Timmermans
LICENSE
=======
Artistic License 2.0