[#301] pkg/object: Add MarshalHeaderJSON method

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-06-07 13:43:14 +03:00 committed by Leonard Lyubich
parent cc1163fd57
commit 0f478a9dc6

View file

@ -37,3 +37,9 @@ func (o *Object) ToV2() *object.Object {
return nil return nil
} }
// MarshalHeaderJSON marshals object's header
// into JSON format.
func (o *Object) MarshalHeaderJSON() ([]byte, error) {
return (*object.Object)(o.rwObject).GetHeader().MarshalJSON()
}