Browse Source

Always marshal timeduration as a string

Mariano Cano 7 years ago
parent
commit
d7221e15ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      authority/provisioner/timeduration.go

+ 1 - 1
authority/provisioner/timeduration.go

@@ -75,7 +75,7 @@ func (t TimeDuration) MarshalJSON() ([]byte, error) {
 	switch {
 	case t.t.IsZero():
 		if t.d == 0 {
-			return []byte("null"), nil
+			return []byte(`""`), nil
 		}
 		return json.Marshal(t.d.String())
 	default: