You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
When sending data from a backend service to the client the data is in many cases converted to JSON. Complex data types such as DateTime is serialized into strings.
Therefor it would be a much needed feature to be able to override the output type in the generator, so that in this example the DateTime becomes strings. Otherwise the TS interfaces would need a concrete class implementation to be useful (someone that creates a new Date() from the JSON).
One way to solve this, and this is indeed how we solves it now in my project, is to simple let the date times be strings on the C# end as well and then we parse them manually. But this could be done all by magic by the JSON serializer.
Suggestion:
Imlement a overide feature that take From>To type by config that is valid for all types in folder.
Or a To type in a data annotation.
When sending data from a backend service to the client the data is in many cases converted to JSON. Complex data types such as DateTime is serialized into strings.
Therefor it would be a much needed feature to be able to override the output type in the generator, so that in this example the DateTime becomes strings. Otherwise the TS interfaces would need a concrete class implementation to be useful (someone that creates a
new Date()from the JSON).One way to solve this, and this is indeed how we solves it now in my project, is to simple let the date times be strings on the C# end as well and then we parse them manually. But this could be done all by magic by the JSON serializer.
Suggestion:
Imlement a overide feature that take From>To type by config that is valid for all types in folder.
Or a To type in a data annotation.