# Decorator OnSerialize
Decorator schema propertyModule | import { OnSerialize } from "@tsed/json-mapper" |
---|---|
Source | /packages/json-mapper/src/decorators/onSerialize.ts |
# Overview
function OnSerialize(cb: OnSerializeCallback): PropertyDecorator;
# Description
Call the function before property serialization.
# Example
class Model {
@OnSerialize(v => v + 1)
property: string;
}
1
2
3
4
2
3
4
Other topics
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Seq
- OIDC
- Stripe
- Controllers
- Providers
- Model
- JsonMapper
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Exceptions
- Hooks
- Response Filter
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing