func NewJSONSource(data []byte) (InputSourceContext, error) {
	var deserialized map[string]interface{}
	if err := json.Unmarshal(data, &deserialized); err != nil {
		return nil, err
	}
	return &jsonSource{deserialized: deserialized}, nil
}
NewJSONSource returns an InputSourceContext suitable for retrieving
config variables from raw JSON data.
package altsrc
import (
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"strings"
	"time"
	"github.com/urfave/cli/v2"
)
func NewJSONSourceFromFlagFunc(flag string) func(c *cli.Context) (InputSourceContext, error) {
	return func(context *cli.Context) (InputSourceContext, error) {
		return NewJSONSourceFromFile(context.String(flag))
	}
}
func NewJSONSourceFromFile(f string) (InputSourceContext, error) {
	data, err := loadDataFrom(f)
	if err != nil {
		return nil, err
	}
	return NewJSONSource(data)
}
func NewJSONSourceFromReader(r io.Reader) (InputSourceContext, error) {
	data, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, err
	}
	return NewJSONSource(data)
}