package
0.5.1
Repository: https://github.com/warthog618/config.git
Documentation: pkg.go.dev

# README

json

GoDoc

The json package provides a config Decoder that unmarshals values from JSON formatted sources.

Example usage:

import (
    "fmt"

    "github.com/warthog618/config"
    "github.com/warthog618/config/blob"
    "github.com/warthog618/config/blob/decoder/json"
    "github.com/warthog618/config/blob/loader/file"
)

func main() {
    c := config.New(blob.New(file.New("config.json"), json.NewDecoder()))
    s := c.MustGet("nested.string").String()
    fmt.Println("s:", s)
    // ....
}

# Functions

NewDecoder returns a JSON decoder.

# Structs

Decoder provides the Decoder API required by config.Source.