You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: decoder_util.go
    path of file: ./repos/moby/vendor/github.com/aws/smithy-go/encoding/json
    
    the code of the file until where you have to start completion: package json

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
)

// DiscardUnknownField discards unknown fields from a decoder body.
// This function is useful while deserializing a JSON body with additional
// unknown information that should be discarded.
func DiscardUnknownField(decoder *json.Decod
    
func DiscardUnknownField(decoder *json.Decoder) error {
	// This deliberately does not share logic with CollectUnknownField, even
	// though it could, because if we were to delegate to that then we'd incur
	// extra allocations and general memory usage.
	v, err := decoder.Token()
	if err == io.EOF {
		return nil
	}
	if err != nil {
		return err
	}

	if _, ok := v.(json.Delim); ok {
		for decoder.More() {
			err = DiscardUnknownField(decoder)
		}
		endToken, err := decoder.Token()
		if err != nil {
			return err
		}
		if _, ok := endToken.(json.Delim); !ok {
			return fmt.Errorf("invalid JSON : expected json delimiter, found %T %v",
				endToken, endToken)
		}
	}

	return nil
}