3 ms·
> what's really lacking in JSON is any support for using custom types to disambiguate polymorphism Unless I misunderstood you, you can use tagged unions[1] for
by magicalhippo 4y ago
> what's really lacking in JSON is any support for using custom types to disambiguate polymorphism
Unless I misunderstood you, you can use tagged unions[1] for this so not sure JSON needs any change there. Slightly more verbose but shouldn't be an issue in practice.
[1]: https://en.wikipedia.org/wiki/Tagged_union https://en.wikipedia.org/wiki/Tagged_union