2020-02-17
1944
#nestjs
Maciej Cieślar
14055
Feb 17, 2020 ⋅ 6 min read

Serialization in NestJS: A different approach

Maciej Cieślar A JavaScript developer and a blogger at mcieslar.com.

Recent posts:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 ⋅ 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 ⋅ 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 ⋅ 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 ⋅ 5 min read
View all posts

4 Replies to "Serialization in NestJS: A different approach"

  1. Thanks! Great tutorial! Could you please give a repository link with this example ?

  2. Excellent example!, but this does not seems to be working, and there are many files mentioned in this example are missing. Please share the git link for the example Or please update the blog with proper files/ missing file ie., SerializedUserDTO, UserRole.
    and where to use the below line.

    return {
    user: Serializable,
    otherProperty: true,
    };

  3. The core of the issue comes from your lack of DTO. You’re supposed to map your entities to DTO classes, then you can keep ClassSerializerInterceptor and introduce more information in the DTO.

Leave a Reply