@@ -59,7 +59,7 @@ func (o Object) MarshalJSON() ([]byte, error) {
5959 temp := struct {
6060 BucketName string `json:"bucket"`
6161 Name string `json:"name"`
62- Size int64 `json:"- "`
62+ Size int64 `json:"size,string "`
6363 ContentType string `json:"contentType"`
6464 ContentEncoding string `json:"contentEncoding"`
6565 Content []byte `json:"-"`
@@ -76,6 +76,7 @@ func (o Object) MarshalJSON() ([]byte, error) {
7676 Name : o .Name ,
7777 ContentType : o .ContentType ,
7878 ContentEncoding : o .ContentEncoding ,
79+ Size : o .Size ,
7980 Content : o .Content ,
8081 Crc32c : o .Crc32c ,
8182 Md5Hash : o .Md5Hash ,
@@ -97,7 +98,7 @@ func (o *Object) UnmarshalJSON(data []byte) error {
9798 temp := struct {
9899 BucketName string `json:"bucket"`
99100 Name string `json:"name"`
100- Size int64 `json:"- "`
101+ Size int64 `json:"size,string "`
101102 ContentType string `json:"contentType"`
102103 ContentEncoding string `json:"contentEncoding"`
103104 Content []byte `json:"-"`
@@ -117,6 +118,7 @@ func (o *Object) UnmarshalJSON(data []byte) error {
117118 o .Name = temp .Name
118119 o .ContentType = temp .ContentType
119120 o .ContentEncoding = temp .ContentEncoding
121+ o .Size = temp .Size
120122 o .Content = temp .Content
121123 o .Crc32c = temp .Crc32c
122124 o .Md5Hash = temp .Md5Hash
0 commit comments