scalar.go
func (u *URI) UnmarshalJSON(data []byte) error {
	// Ignore null, like in the main JSON package.
	if string(data) == "null" {
		return nil
	}
	var s string
	err := json.Unmarshal(data, &s)
	if err != nil {
		return err
	}
	u.URL, err = url.Parse(s)
	return err
}
func (u *URI) UnmarshalJSON(data []byte) error {
	// Ignore null, like in the main JSON package.
	if string(data) == "null" {
		return nil
	}
	var s string
	err := json.Unmarshal(data, &s)
	if err != nil {
		return err
	}
	u.URL, err = url.Parse(s)
	return err
}
// UnmarshalJSON implements the json.Unmarshaler interface.
// The URI is expected to be a quoted string.