mirror of
https://github.com/aykhans/dodo.git
synced 2025-09-05 18:44:21 +00:00
Compare commits
2 Commits
v0.5.5
...
d5495348a0
Author | SHA1 | Date | |
---|---|---|---|
d5495348a0 | |||
40f8a1cc37 |
@@ -17,6 +17,9 @@ func (t TruncatedMarshaller) MarshalJSON() ([]byte, error) {
|
||||
if val.Kind() != reflect.Slice && val.Kind() != reflect.Array {
|
||||
return json.Marshal(t.Value)
|
||||
}
|
||||
if val.Len() == 0 {
|
||||
return []byte("[]"), nil
|
||||
}
|
||||
|
||||
length := val.Len()
|
||||
if length <= t.MaxItems {
|
||||
|
Reference in New Issue
Block a user