samchon / typia

Super-fast/easy runtime validators and serializers via transformation
https://typia.io/
MIT License
4.45k stars 153 forks source link

Feature request / question: Using typia to serialize / deserialize dates #979

Open samirotiv opened 6 months ago

samirotiv commented 6 months ago

Feature Request

Thanks for your suggestion. Feel free to just state your idea. Writing the issue, it would better to filling the below items:

Hi @samchon , thank you for the fantastic work! Here are is one common problem: NestJS APIs often receive date fields in the request body, which may be optional (nullable). These need to be converted into instances of Date before they can be saved. There is a lot of repetitive code for this.

Instead of this repetitive code, if there is a field of type Date or any other class, is it possible to get Typia to automatically parse this into an instance of Date?

Maybe this is already possible, but I am not seeing it. In that case sorry for the unnecessary issue, request if you could suggest your best way of doing it.

samchon commented 6 months ago

Automatic transformation feature is oftenly issued subject.

I'm planning to develop it, but sorry for cannot sure when.