4 ms·
XML tends to be more feature-rich than people need, but what's really lacking in JSON is any support for using custom types to disambiguate polymorphism. I can
by dehrmann 4y ago
XML tends to be more feature-rich than people need, but what's really lacking in JSON is any support for using custom types to disambiguate polymorphism.
I can't seem to find it, but there's a serialization that's basically Python, so
Stuff(a=10, b={"foo": bar})
It makes it easy to have a list with objects of different types in it.
- dralley 4y agohttps://github.com/ron-rs/ron https://github.com/ron-rs/ron
- 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