func MarshalFast(v interface{}) ([]byte, error) {
	_, ok := v.(marshalerFaster)
	if !ok {
		return nil, errors.New("ffjson marshal not available for type " + reflect.TypeOf(v).String())
	}
	return Marshal(v)
}
MarshalFast will marshal the data if fast marshal is available.
This function can be used if you want to be sure the fast
marshal is used or in testing.
If you would like to have fallback to encoding/json you can use the
Marshal() method.
package ffjson
import (
	"encoding/json"
	"errors"
	fflib "github.com/pquerna/ffjson/fflib/v1"
	"reflect"
)
type marshalerFaster interface {
	MarshalJSONBuf(buf fflib.EncodingBuffer) error
}
type unmarshalFaster interface {
	UnmarshalJSONFFLexer(l *fflib.FFLexer, state fflib.FFParseState) error
}
func Marshal(v interface{}) ([]byte, error) {
	f, ok := v.(marshalerFaster)
	if ok {
		buf := fflib.Buffer{}
		err := f.MarshalJSONBuf(&buf)
		b := buf.Bytes()
		if err != nil {
			if len(b) > 0 {
				Pool(b)
			}
			return nil, err
		}
		return b, nil
	}
	j, ok := v.(json.Marshaler)
	if ok {
		return j.MarshalJSON()
	}
	return json.Marshal(v)
}