func (s JSONMapSlice) MarshalJSON() ([]byte, error) {
	w := &jwriter.Writer{Flags: jwriter.NilMapAsEmpty | jwriter.NilSliceAsEmpty}
	s.MarshalEasyJSON(w)
	return w.BuildBytes()
}
MarshalJSON renders a JSONMapSlice as JSON
package swag
import (
	"encoding/json"
	"fmt"
	"path/filepath"
	"strconv"
	"github.com/mailru/easyjson/jlexer"
	"github.com/mailru/easyjson/jwriter"
	yaml "gopkg.in/yaml.v2"
)
func YAMLMatcher(path string) bool {
	ext := filepath.Ext(path)
	return ext == ".yaml" || ext == ".yml"
}
func YAMLToJSON(data interface{}) (json.RawMessage, error) {
	jm, err := transformData(data)
	if err != nil {
		return nil, err
	}
	b, err := WriteJSON(jm)
	return json.RawMessage(b), err
}
func BytesToYAMLDoc(data []byte) (interface{}, error) {
	var canary map[interface{}]interface{}  
	if err := yaml.Unmarshal(data, &canary); err != nil {
		return nil, err
	}
	var document yaml.MapSlice  
	if err := yaml.Unmarshal(data, &document); err != nil {
		return nil, err
	}
	return document, nil
}
type JSONMapSlice []JSONMapItem