[#172] object: Allow to marshal SplitInfo to JSON

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-03-14 16:52:45 +03:00 committed by Alex Vanin
parent 7d19718e1d
commit 3e12d0eb69
2 changed files with 25 additions and 0 deletions

View file

@ -65,3 +65,13 @@ func (s *SplitInfo) Marshal() ([]byte, error) {
func (s *SplitInfo) Unmarshal(data []byte) error {
return (*object.SplitInfo)(s).Unmarshal(data)
}
// MarshalJSON implements json.Marshaler.
func (s *SplitInfo) MarshalJSON() ([]byte, error) {
return (*object.SplitInfo)(s).MarshalJSON()
}
// UnmarshalJSON implements json.Unmarshaler.
func (s *SplitInfo) UnmarshalJSON(data []byte) error {
return (*object.SplitInfo)(s).UnmarshalJSON(data)
}