Skip to content

Commit 01cb57f

Browse files
authored
Merge pull request #237 from m-lab/fix-decode
remove DisallowUnknownFields
2 parents 210c2ff + 15c0074 commit 01cb57f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

api/v2/api-v2.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ func GetAnnotations(ctx context.Context, url string, date time.Time, ips []strin
180180
// When this happens, it is likely to be very spammy.
181181
decodeLogEvery.Println("Decode error:", err)
182182

183+
// Try again but ignore unknown fields.
183184
decoder := json.NewDecoder(bytes.NewReader(body))
184-
decoder.DisallowUnknownFields()
185-
186185
err = decoder.Decode(&resp)
187186
if err != nil {
188187
// This is a more serious error.

0 commit comments

Comments
 (0)