MCPcopy
hub / github.com/danielgtaylor/huma / Marshal

Method Marshal

api.go:277–277  ·  view source on GitHub ↗

Marshal marshals the given value into the given writer. The content type is used to determine which format to use. Use `Negotiate` to get the content type from an accept header.

(w io.Writer, contentType string, v any)

Source from the content-addressed store, hash-verified

275 // content type is used to determine which format to use. Use `Negotiate` to
276 // get the content type from an accept header.
277 Marshal(w io.Writer, contentType string, v any) error
278
279 // Unmarshal unmarshals the given data into the given value. The content type
280 Unmarshal(contentType string, data []byte, v any) error

Callers 15

MarshalMethod · 0.65
NewAPIFunction · 0.65
ensureTypeFunction · 0.65
marshalJSONFunction · 0.65
YAMLMethod · 0.65
DowngradeMethod · 0.65
TestSchemaFunction · 0.65
TestSchemaGenericNamingFunction · 0.65
TestMarshalDiscriminatorFunction · 0.65
TestNonJSONValidationFunction · 0.65
MarshalJSONMethod · 0.65

Implementers 1

apiapi.go

Calls

no outgoing calls

Tested by 15

TestSchemaFunction · 0.52
TestSchemaGenericNamingFunction · 0.52
TestMarshalDiscriminatorFunction · 0.52
TestNonJSONValidationFunction · 0.52
TestHumaFiberV2Function · 0.52
TestHumaFiberFunction · 0.52
BenchmarkRawBunRouterFunction · 0.52
BenchmarkRawEchoFunction · 0.52
BenchmarkRawEchoFastFunction · 0.52
BenchmarkRawGoFunction · 0.52