Skip to content

Commit

Permalink
Merge pull request #237 from m-lab/fix-decode
Browse files Browse the repository at this point in the history
remove DisallowUnknownFields
  • Loading branch information
gfr10598 authored Apr 29, 2019
2 parents 210c2ff + 15c0074 commit 01cb57f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/v2/api-v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ func GetAnnotations(ctx context.Context, url string, date time.Time, ips []strin
// When this happens, it is likely to be very spammy.
decodeLogEvery.Println("Decode error:", err)

// Try again but ignore unknown fields.
decoder := json.NewDecoder(bytes.NewReader(body))
decoder.DisallowUnknownFields()

err = decoder.Decode(&resp)
if err != nil {
// This is a more serious error.
Expand Down

0 comments on commit 01cb57f

Please sign in to comment.