github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/object/json.go (about) 1 package object 2 3 import ( 4 object "github.com/TrueCloudLab/frostfs-api-go/v2/object/grpc" 5 "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message" 6 ) 7 8 func (h *ShortHeader) MarshalJSON() ([]byte, error) { 9 return message.MarshalJSON(h) 10 } 11 12 func (h *ShortHeader) UnmarshalJSON(data []byte) error { 13 return message.UnmarshalJSON(h, data, new(object.ShortHeader)) 14 } 15 16 func (a *Attribute) MarshalJSON() ([]byte, error) { 17 return message.MarshalJSON(a) 18 } 19 20 func (a *Attribute) UnmarshalJSON(data []byte) error { 21 return message.UnmarshalJSON(a, data, new(object.Header_Attribute)) 22 } 23 24 func (h *SplitHeader) MarshalJSON() ([]byte, error) { 25 return message.MarshalJSON(h) 26 } 27 28 func (h *SplitHeader) UnmarshalJSON(data []byte) error { 29 return message.UnmarshalJSON(h, data, new(object.Header_Split)) 30 } 31 32 func (h *Header) MarshalJSON() ([]byte, error) { 33 return message.MarshalJSON(h) 34 } 35 36 func (h *Header) UnmarshalJSON(data []byte) error { 37 return message.UnmarshalJSON(h, data, new(object.Header)) 38 } 39 40 func (h *HeaderWithSignature) MarshalJSON() ([]byte, error) { 41 return message.MarshalJSON(h) 42 } 43 44 func (h *HeaderWithSignature) UnmarshalJSON(data []byte) error { 45 return message.UnmarshalJSON(h, data, new(object.HeaderWithSignature)) 46 } 47 48 func (o *Object) MarshalJSON() ([]byte, error) { 49 return message.MarshalJSON(o) 50 } 51 52 func (o *Object) UnmarshalJSON(data []byte) error { 53 return message.UnmarshalJSON(o, data, new(object.Object)) 54 } 55 56 func (s *SplitInfo) MarshalJSON() ([]byte, error) { 57 return message.MarshalJSON(s) 58 } 59 60 func (s *SplitInfo) UnmarshalJSON(data []byte) error { 61 return message.UnmarshalJSON(s, data, new(object.SplitInfo)) 62 } 63 64 func (f *SearchFilter) MarshalJSON() ([]byte, error) { 65 return message.MarshalJSON(f) 66 } 67 68 func (f *SearchFilter) UnmarshalJSON(data []byte) error { 69 return message.UnmarshalJSON(f, data, new(object.SearchRequest_Body_Filter)) 70 } 71 72 func (r *Range) MarshalJSON() ([]byte, error) { 73 return message.MarshalJSON(r) 74 } 75 76 func (r *Range) UnmarshalJSON(data []byte) error { 77 return message.UnmarshalJSON(r, data, new(object.Range)) 78 }