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 has been archived by the owner on May 26, 2023. It is now read-only.
Basically, I know there is a timestamp of DateTime which is represented as Json.t (string). It'd be really nice to be able to annotate my client with additional decoder information so that I automatically get an option(Js.Date.t).
Something akin to this perhaps:
let customDecoders = [ObjectField("User", "createdAt", parseDate)];
Then it'd be fairly easy to annotate all the types/fields that are date times, and remove the need for conversions everywhere at usage sites.
The text was updated successfully, but these errors were encountered:
Issue Labels
So this might be a bit strange, but it would possibly be nice to be able to define custom decoders for combination of
ObjectType.fieldName
.Consider the code below:
Basically, I know there is a timestamp of
DateTime
which is represented asJson.t (string)
. It'd be really nice to be able to annotate my client with additional decoder information so that I automatically get anoption(Js.Date.t)
.Something akin to this perhaps:
Then it'd be fairly easy to annotate all the types/fields that are date times, and remove the need for conversions everywhere at usage sites.
The text was updated successfully, but these errors were encountered: