I think JSON allows both of your use cases, you'll just have to define your own deserialization.
We've used { "__type": "DOG" } as metadata flags in GraphQL and JSON API's for a long time.
I rarely see an API return anything other than an ISO8601 UTC datetime string anymore other than Xero's horrific .NET(?) string " /Date(1326480130277+1300)/"
I moved our massive lerna monorepo to yarn v2 with PnP workspaces and cut 20 minutes off our CI time, deploy/build time (typescript) cut dramatically and reduced even our frontend bundle sizes thanks to the new and improved dedupe.
It took all of maybe 10hrs but I've already made that back easily.
Also checking out branches and syncing takes all of 3s versus the massive link process we used to have to do.
We've used { "__type": "DOG" } as metadata flags in GraphQL and JSON API's for a long time.
I rarely see an API return anything other than an ISO8601 UTC datetime string anymore other than Xero's horrific .NET(?) string " /Date(1326480130277+1300)/"