func (e *Encoder) EncodeFast(v interface{}) error {
	_, ok := v.(marshalerFaster)
	if !ok {
		return errors.New("ffjson marshal not available for type " + reflect.TypeOf(v).String())
	}
	return e.Encode(v)
}
EncodeFast will unmarshal the data if fast marshall 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
regular Encode() method.
package ffjson
import (
	"encoding/json"
	"errors"
	fflib "github.com/pquerna/ffjson/fflib/v1"
	"io"
	"reflect"
)
type Encoder struct {
	buf fflib.Buffer
	w   io.Writer
	enc *json.Encoder
}
func NewEncoder(w io.Writer) *Encoder {
	return &Encoder{w: w, enc: json.NewEncoder(w)}
}
func (e *Encoder) Encode(v interface{}) error {
	f, ok := v.(marshalerFaster)
	if ok {
		e.buf.Reset()
		err := f.MarshalJSONBuf(&e.buf)
		if err != nil {
			return err
		}
		_, err = io.Copy(e.w, &e.buf)
		return err
	}
	return e.enc.Encode(v)
}