func YAMLToJSON(y []byte) ([]byte, error) {
	return yamlToJSON(y, nil)
}
Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through
this method should be a no-op.

Things YAML can do that are not supported by JSON:
* In YAML you can have binary and null keys in your maps. These are invalid
in JSON. (int and float keys are converted to strings.)
* Binary data in YAML with the !!binary tag is not supported. If you want to
use binary data with this library, encode the data as base64 as usual but do
not use the !!binary tag in your YAML. This will ensure the original base64
encoded data makes it all the way through to the JSON.
package yaml
import (
	"bytes"
	"encoding/json"
	"fmt"
	"reflect"
	"strconv"
	"gopkg.in/yaml.v2"
)
func Marshal(o interface{}) ([]byte, error) {
	j, err := json.Marshal(o)
	if err != nil {
		return nil, fmt.Errorf("error marshaling into JSON: ", err)
	}
	y, err := JSONToYAML(j)
	if err != nil {
		return nil, fmt.Errorf("error converting JSON to YAML: ", err)
	}
	return y, nil
}
func Unmarshal(y []byte, o interface{}) error {
	vo := reflect.ValueOf(o)
	j, err := yamlToJSON(y, &vo)
	if err != nil {
		return fmt.Errorf("error converting YAML to JSON: %v", err)
	}
	err = json.Unmarshal(j, o)
	if err != nil {
		return fmt.Errorf("error unmarshaling JSON: %v", err)
	}
	return nil
}
func JSONToYAML(j []byte) ([]byte, error) {
	var jsonObj interface{}
	err := yaml.Unmarshal(j, &jsonObj)
	if err != nil {
		return nil, err
	}
	return yaml.Marshal(jsonObj)
}