func (country *Country) UnmarshalJSON(data []byte) error {
	var str string
	if err := json.Unmarshal(data, &str); err != nil {
		return err
	}
	_, err := ByCountryStrErr(str)
	if err != nil {
		return err
	}
	*country = Country(str)
	return nil
}
UnmarshalJSON unmarshall implementation for Country
package currency
import (
	"database/sql/driver"
	"encoding/json"
	"fmt"
)
type Country string
func (country Country) Value() (value driver.Value, err error) {
	if country == "" {
		return "", nil
	}
	if err = country.Validate(); err != nil {
		return nil, err
	}
	return country.String(), nil
}