github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/container/json.go (about) 1 package container 2 3 import ( 4 container "github.com/TrueCloudLab/frostfs-api-go/v2/container/grpc" 5 "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message" 6 ) 7 8 func (a *Attribute) MarshalJSON() ([]byte, error) { 9 return message.MarshalJSON(a) 10 } 11 12 func (a *Attribute) UnmarshalJSON(data []byte) error { 13 return message.UnmarshalJSON(a, data, new(container.Container_Attribute)) 14 } 15 16 func (c *Container) MarshalJSON() ([]byte, error) { 17 return message.MarshalJSON(c) 18 } 19 20 func (c *Container) UnmarshalJSON(data []byte) error { 21 return message.UnmarshalJSON(c, data, new(container.Container)) 22 }