# OnDeserialize Decorator jsonMapper schema property alias
Module | import { OnDeserialize } from "@tsed/common" |
---|---|
Source | /packages/common/src/jsonschema/decorators/propertyDeserialize.ts |
# Overview
function OnDeserialize(fn: (value: any) => any): Function;
# Description
Call the function before property deserialization.
# Example
class Model {
@OnDeserialize(v => v + 1)
property: string;
}
1
2
3
4
2
3
4
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing