> The project I'm working on is dealing with timestamp ranges which of course can't be serialized to JSON.
JSON is a low-level serialization format, on which you often need to build application-specific high-level formats. You can serialize a tsrange into JSON a number of ways, but your deserializer will.need to be aware of the higher-level format you create by your decisions on how to serialize unsupported types as composites of supported types.