MCPcopy
hub / github.com/openai/openai-go / MarshalObject

Function MarshalObject

packages/param/encoder.go:36–38  ·  view source on GitHub ↗

MarshalObject uses a shimmed 'encoding/json' from Go 1.24, to support the 'omitzero' tag Stability for the API of MarshalObject is not guaranteed.

(f T, underlying any)

Source from the content-addressed store, hash-verified

34//
35// Stability for the API of MarshalObject is not guaranteed.
36func MarshalObject[T ParamStruct](f T, underlying any) ([]byte, error) {
37 return MarshalWithExtras(f, underlying, f.extraFields())
38}
39
40// MarshalWithExtras is used to marshal a struct with additional properties.
41//

Callers 15

MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92
MarshalJSONMethod · 0.92

Calls 2

MarshalWithExtrasFunction · 0.85
extraFieldsMethod · 0.65

Tested by 5

MarshalJSONMethod · 0.74
MarshalJSONMethod · 0.74
MarshalJSONMethod · 0.74
MarshalJSONMethod · 0.74
MarshalJSONMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…