From 45f5769c98b815f588d6ac2612bd2a15975fb487 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 31 Aug 2015 12:01:17 -0700 Subject: [PATCH] Fixed datetime unmarshalling issue --- types.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types.go b/types.go index 9519a5c..57073bb 100644 --- a/types.go +++ b/types.go @@ -154,10 +154,8 @@ func (t *NullTime) UnmarshalJSON(b []byte) error { var err error json.Unmarshal(b, &x) switch x.(type) { - case time.Time: + case string: err = json.Unmarshal(b, &t.Time) - case map[string]interface{}: - err = json.Unmarshal(b, &t.NullTime) } t.Valid = true return err