Skip to content

huml-lang/go-huml

Repository files navigation

go-huml

This is an experimental Go parser implementation for HUML (Human-oriented Markup Language). The API is similar to encoding/json.

Go Reference

Usage

Unmarshalling

package main

import (
    "fmt"

    "github.com/huml-lang/go-huml"
)

func main() {
	var result map[string]any
	if err := Unmarshal([]byte(doc), &result); err != nil {
		panic(err)
	}

	fmt.Println(v)
}

Marshalling

package main

import (
    "fmt"

    "github.com/huml-lang/go-huml"
)

func main() {
	res, err := Marshal(stuff);
	if err != nil {
		panic(err)
	}

	fmt.Println(string(res))
}

Development Setup

This project uses git submodules for test data. After cloning the repository, initialize the submodules:

git submodule update --init --recursive

This will pull the test cases from the huml-lang/tests repository into the tests/ directory.

MIT License

About

An experimental Go library for parsing (marshalling and unmarshalling) HUML.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages