func (ut Utils) JSON(src interface{}) (v interface{}) {
	ut.Helper()
	var b []byte
	switch obj := src.(type) {
	case []byte:
		b = obj
	case string:
		b = []byte(obj)
	case io.Reader:
		var err error
		b, err = ioutil.ReadAll(obj)
		ut.err(err)
	}
	ut.err(json.Unmarshal(b, &v))
	return
}
JSON from string, []byte, or io.Reader
package got
import (
	"bytes"
	"context"
	"crypto/rand"
	"encoding/hex"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"mime"
	"net"
	"net/http"
	"net/url"
	"os"
	"path/filepath"
	"reflect"
	"strings"
	"sync"
	"time"
)
type Context struct {
	context.Context
	Cancel func()
}
type Utils struct {
	Testable
}
func (ut Utils) Fatal(args ...interface{}) {
	ut.Helper()
	ut.Log(args...)
	ut.FailNow()
}
func (ut Utils) Fatalf(format string, args ...interface{}) {
	ut.Helper()
	ut.Logf(format, args...)
	ut.FailNow()
}
func (ut Utils) Log(args ...interface{}) {
	ut.Helper()
	ut.Logf("%s", fmt.Sprintln(args...))
}
func (ut Utils) Error(args ...interface{}) {
	ut.Helper()
	ut.Log(args...)
	ut.Fail()
}
func (ut Utils) Errorf(format string, args ...interface{}) {
	ut.Helper()
	ut.Logf(format, args...)
	ut.Fail()
}
func (ut Utils) Skipf(format string, args ...interface{}) {
	ut.Helper()
	ut.Logf(format, args...)
	ut.SkipNow()
}
func (ut Utils) Skip(args ...interface{}) {
	ut.Helper()
	ut.Log(args...)
	ut.SkipNow()
}
func (ut Utils) Run(name string, f func(t G)) bool {
	runVal := reflect.ValueOf(ut.Testable).MethodByName("Run")
	return runVal.Call([]reflect.Value{
		reflect.ValueOf(name),
		reflect.MakeFunc(runVal.Type().In(1), func(args []reflect.Value) []reflect.Value {
			f(New(args[0].Interface().(Testable)))
			return nil
		}),
	})[0].Interface().(bool)
}
func (ut Utils) Parallel() Utils {
	reflect.ValueOf(ut.Testable).MethodByName("Parallel").Call(nil)
	return ut
}
func (ut Utils) DoAfter(d time.Duration, do func()) (cancel func()) {
	ctx := ut.Context()
	go func() {
		ut.Helper()
		tmr := time.NewTimer(d)
		defer tmr.Stop()
		select {
		case <-ctx.Done():
		case <-tmr.C:
			do()
		}
	}()
	return ctx.Cancel
}
func (ut Utils) PanicAfter(d time.Duration) (cancel func()) {
	return ut.DoAfter(d, func() {
		ut.Helper()
		panicWithTrace(fmt.Sprintf("%s timeout after %v", ut.Name(), d))
	})
}
func (ut Utils) Context() Context {
	ctx, cancel := context.WithCancel(context.Background())
	ut.Cleanup(cancel)
	return Context{ctx, cancel}
}
func (ut Utils) Timeout(d time.Duration) Context {
	ctx, cancel := context.WithTimeout(context.Background(), d)
	ut.Cleanup(cancel)
	return Context{ctx, cancel}
}
func (ut Utils) Srand(l int) string {
	ut.Helper()
	b := make([]byte, (l+1)/2)
	_, err := rand.Read(b)
	ut.err(err)
	return hex.EncodeToString(b)[:l]
}
func (ut Utils) Open(create bool, path ...string) (f *os.File) {
	p := filepath.Join(path...)
	dir := filepath.Dir(p)
	_ = os.MkdirAll(dir, 0755)
	var err error
	if create {
		f, err = os.Create(p)
	} else {
		f, err = os.Open(p)
	}
	ut.err(err)
	return f
}
func (ut Utils) Read(r io.Reader) *bytes.Buffer {
	ut.Helper()
	b := bytes.NewBuffer(nil)
	_, err := io.Copy(b, r)
	ut.err(err)
	return b
}