apimachinery: k8s.io/apimachinery/third_party/forked/golang/json Index | Files

package json

import "k8s.io/apimachinery/third_party/forked/golang/json"

Package json is forked from the Go standard library to enable us to find the field of a struct that a given JSON key maps to.

Index

Package Files

fields.go

func LookupPatchMetadataForStruct Uses

func LookupPatchMetadataForStruct(t reflect.Type, jsonField string) (
    elemType reflect.Type, patchStrategies []string, patchMergeKey string, e error)

Finds the patchStrategy and patchMergeKey struct tag fields on a given struct field given the struct type and the JSON name of the field. It returns field type, a slice of patch strategies, merge key and error. TODO: fix the returned errors to be introspectable.

Package json imports 8 packages (graph) and is imported by 2 packages. Updated 2019-03-03. Refresh now. Tools for package owners.