https://github.com/snwfdhmp/decode
Helpers to parse JSON/YAML files into Golang structs
https://github.com/snwfdhmp/decode
json-parser parser-library shortcut yaml-parser
Last synced: 6 months ago
JSON representation
Helpers to parse JSON/YAML files into Golang structs
- Host: GitHub
- URL: https://github.com/snwfdhmp/decode
- Owner: snwfdhmp
- Created: 2018-04-05T02:28:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T10:28:49.000Z (over 5 years ago)
- Last Synced: 2025-04-12T07:12:16.117Z (6 months ago)
- Topics: json-parser, parser-library, shortcut, yaml-parser
- Language: Go
- Homepage: https://godoc.org/github.com/snwfdhmp/decode
- Size: 4.88 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Decode
[](https://goreportcard.com/report/github.com/snwfdhmp/decode) [](http://godoc.org/github.com/snwfdhmp/decode) [](https://cover.run/go?tag=golang-1.10&repo=github.com%2Fsnwfdhmp%2Fdecode)
## Install
Install with `go get github.com/snwfdhmp/decode`.
Import with
```golang
import "github.com/snwfdhmp/decode"
```## Usage
Decode YAML
```golang
var data interface{}
err := decode.YAML("config.yml", &data)
```or decode JSON
```golang
var data interface{}
err := decode.JSON("config.json", &data)
```## Documentation
Complete documentation can be found on [godoc](http://godoc.org/github.com/snwfdhmp/decode)
## Contributors
- [snwfdhmp](http://github.com/snwfdhmp) - author