Instead, make `ReferredType` into a sealed class and manually parse the JSON. There is no need to have a tagged union approach with the `Kind` enum.