func (i *ID) UnmarshalJSON(v []byte) error {
	var s string

	if err := json.Unmarshal(v, &s); err != nil {
		return errors.Wrap(err, "unable to unmarshal object ID")
	}

	tmp, err := ParseID(s)
	if err != nil {
		return errors.Wrap(err, "invalid object ID")
	}

	*i = tmp

	return nil
}
// UnmarshalJSON implements JSON deserialization of IDs.
UnmarshalJSON implements JSON deserialization of IDs.
// UnmarshalJSON implements JSON deserialization of IDs .
func (i *ID) UnmarshalJSON(v []byte) error {
	var s string
	if err := json.Unmarshal(v, &s); err != nil {
		return errors.Wrap(err, "unable to unmarshal object ID")
	}
	tmp, err := ParseID(s)
	if err != nil {
		return errors.Wrap(err, "invalid object ID")
	}
	*i = tmp
	return nil
}
func ( i * ID ) UnmarshalJSON ( v [ ] byte ) error { var s string if err := json . Unmarshal ( v , & s ) ; err != nil { return errors . Wrap ( err , " " ) } tmp , err := ParseID ( s ) if err != nil { return errors . Wrap ( err , " " ) } * i = tmp return nil }
UnmarshalJSON implements JSON deserialization of IDs.
UnmarshalJSON implements JSON deserialization of IDs .