func (u *URL) UnmarshalJSON(b []byte) error {
	var s string
	if err := json.Unmarshal(b, &s); err != nil {
		return err
	}
	url, err := ParseURL(s)
	if err != nil {
		return err
	}
	*u = *url
	return nil
}
// UnmarshalJSON will unmarshal the URL from a JSON representation.
UnmarshalJSON will unmarshal the URL from a JSON representation.
// UnmarshalJSON will unmarshal the URL from a JSON representation .
func (u *URL) UnmarshalJSON(b []byte) error {
	var s string
	if err := json.Unmarshal(b, &s); err != nil {
		return err
	}
	url, err := ParseURL(s)
	if err != nil {
		return err
	}
	*u = *url
	return nil
}
func ( u * URL ) UnmarshalJSON ( b [ ] byte ) error { var s string if err := json . Unmarshal ( b , & s ) ; err != nil { return err } url , err := ParseURL ( s ) if err != nil { return err } * u = * url return nil }
UnmarshalJSON will unmarshal the URL from a JSON representation.
UnmarshalJSON will unmarshal the URL from a JSON representation .