Genuine question—why would you need a sum type in a self-describing data format?
I think it should be pretty obvious how these are helpful and why they are needed no?
I can see why sum types would be useful in a schema or for the elements of a collection that is required to be homogeneous (ie. List<Foo|Bar>).
For what use case would one use custom sum types in a schema-less data format?