getSerializationFunction() — fastify Function Reference
Architecture documentation for the getSerializationFunction() function in reply.js from the fastify codebase.
Entity Profile
Dependency Diagram
graph TD 8396b6da_30d4_d503_67e2_a0552b2d52e1["getSerializationFunction()"] 4bcd71dc_1ec2_5fe8_b8ff_4a371e392925["reply.js"] 8396b6da_30d4_d503_67e2_a0552b2d52e1 -->|defined in| 4bcd71dc_1ec2_5fe8_b8ff_4a371e392925 style 8396b6da_30d4_d503_67e2_a0552b2d52e1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
lib/reply.js lines 325–339
Reply.prototype.getSerializationFunction = function (schemaOrStatus, contentType) {
let serialize
if (typeof schemaOrStatus === 'string' || typeof schemaOrStatus === 'number') {
if (typeof contentType === 'string') {
serialize = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus]?.[contentType]
} else {
serialize = this[kRouteContext][kSchemaResponse]?.[schemaOrStatus]
}
} else if (typeof schemaOrStatus === 'object') {
serialize = this[kRouteContext][kReplyCacheSerializeFns]?.get(schemaOrStatus)
}
return serialize
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does getSerializationFunction() do?
getSerializationFunction() is a function in the fastify codebase, defined in lib/reply.js.
Where is getSerializationFunction() defined?
getSerializationFunction() is defined in lib/reply.js at line 325.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free