[#301] pkg/object: Add `MarshalHeaderJSON` method

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
support/v2.15
Pavel Karpy 2021-06-07 13:43:14 +03:00 committed by Leonard Lyubich
parent cc1163fd57
commit 0f478a9dc6
1 changed files with 6 additions and 0 deletions

View File

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