Skip to content

OnDeserialize

@tsed/json-mapper

Usage ​

typescript
import { OnDeserialize } from "@tsed/json-mapper";

See /packages/specs/json-mapper/src/decorators/onDeserialize.ts.

Overview ​

ts
function OnDeserialize(cb: OnDeserializeCallback): PropertyDecorator;

Description ​

Call the function before property deserialization.

Example ​

typescript
class Model {
   @OnDeserialize(v => v + 1)
   property: string;
}

Released under the MIT License.