func (f *Factory) UseEncoder(encoder Encoder) {
	for _, encodes := range encoder.Encodes() {
		f.encoders[encodes] = encoder
	}
}
UseEncoder registers an encoder with the parcel factory
package parcel
import (
	"errors"
	"mime"
	"net/http"
	"strings"
)
type (
	Candidate interface{}
	Decoder interface {
		Decode(*http.Request, interface{}) error
	}
	Encoder interface {
		Encodes() []string
		ContentType() string
		Encode(http.ResponseWriter, interface{}) error
	}
	Parcel struct {
		RW      http.ResponseWriter
		R       *http.Request
		factory *Factory
	}
	Factory struct {
		defaultEncoder Encoder
		encoders       map[string]Encoder
		decoders       []Decoder
	}
)
var (
	ResponseNotWrittenError = errors.New("Response was not written: No encoder indicated a written response")
)
func NewFactory() *Factory {
	f := new(Factory)
	f.encoders = make(map[string]Encoder)
	f.decoders = make([]Decoder, 0)
	return f
}
func (f *Factory) UseDefaultEncoder(encoder Encoder) {
	f.defaultEncoder = encoder
}