YAMLStar

A YAML load/dump framework for all programming languages

YAMLStar:
  Version: 0.1.15
  Description:
    A pure YAML 1.2 loading and dumping
    with cross-language consistency
  Platforms:
    Supports Linux, macOS and Windows
    for almost all language bindings
  25 Languages (and counting!):
  - Clojure
  - Crystal
  - C#
  - D
  - Dart
  - Delphi
  - Elixir
  - Fortran
  - Go
  - Haskell
  - Java
  - Julia
  - Kotlin
  - Lua
  - Nim
  - Node.js
  - Perl
  - PHP
  - Python
  - R
  - Raku
  - Ruby
  - Rust
  - Swift
  - Zig
  Features:
    Spec Compliant: true   # 100% YAML 1.2 specification
    Load Stack: true       # YAML to native values
    Dump Stack: true       # Native values back to YAML
    Lightweight: true      # Minimal dependencies
    Extensible: true       # Plugin system (Phase 3)

Quick Start:
  Python: |
    # pip install yamlstar
    from yamlstar import YAMLStar

    ys = YAMLStar()
    data = ys.load('key: value')
    # {'key': 'value'}
    text = ys.dump({'foo': [['bar']]})
    # foo:
    # - - bar

  Node.js: |
    // npm install yamlstar
    const YAMLStar = require('yamlstar');

    const ys = new YAMLStar();
    const data = ys.load('key: value');
    // { key: 'value' }
    const text = ys.dump({foo: [['bar']]});
    // foo:
    // - - bar

  Clojure: |
    ; lein/deps.edn: org.yamlstar/yamlstar "0.1.15"
    (require '[yamlstar.core :as yaml])

    (yaml/load "key: value")
    ;=> {"key" "value"}
    (yaml/dump {"foo" [["bar"]]})
    ;=> "foo:\n- - bar\n"

  Go: |
    // go get github.com/yaml/yamlstar-go
    import "github.com/yaml/yamlstar-go"

    ys := yamlstar.New()
    data := ys.Load("key: value")
    // map[string]interface{}{"key": "value"}
    text := yamlstar.Dump(map[string]interface{}{"foo": [][]string{{"bar"}}})
    // foo:
    // - - bar

Architecture:
  Native:
    Written in Clojure and compiled to native binary
    with GraalVM native-image
  Load Stack:
  - Parser: Pure Clojure YAML 1.2 parser
  - Composer: Event stream to node tree
  - Resolver: Type inference (!!str, !!int, !!bool, etc.)
  - Constructor: Nodes to native data structures
  Dump Stack:
  - Representer: Native data to node tree
  - Desolver: Minimal tags and scalar styles
  - Serializer: Node tree to event stream
  - Emitter: Events to YAML text
  Dependencies: 0  # Zero external dependencies

Resources:
  GitHub: https://github.com/yaml/yamlstar
  Documentation: https://yamlstar.org/getting-started
  License: MIT
  Author: Ingy döt Net  # Inventor of YAML