TypeScript JSON Typing: Interfaces, Generics, and Validation