Categorygithub.com/go-zoox/encoding
modulepackage
1.2.1
Repository: https://github.com/go-zoox/encoding.git
Documentation: pkg.go.dev

# README

Encoding - Encode/Decode of JSON/YAML/TOML/INI

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/encoding

Getting Started

func TestEncoding(t *testing.T) {
	obj := map[string]interface{}{
		"foo": "bar",
		"baz": "qux",
	}

	encoded, err := Json.Encode(obj)
	if err != nil {
		t.Errorf("error encoding: %s", err)
	}

	decoded := map[string]interface{}{}
	err = Json.Decode(encoded, &decoded)
	if err != nil {
		t.Errorf("error decoding: %s", err)
	}

	if !reflect.DeepEqual(obj, decoded) {
		t.Errorf("expected %v, got %v", obj, decoded)
	}
}

Inspired by

License

GoZoox is released under the MIT License.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Version is the current version of the package.

# Interfaces

Encoding is an interface for encoding/decoding.