Many have tried to solve this problem – we've found at least 20 projects that attempt to turn JSON sample data into code to represent that data, but they're almost all abandoned and they all have the same fundamental flaws (they generate invalid code for most non-trivial inputs).
In the past two weeks we've created Xcode and VS Code plugins. I've had so much fun with this project! We'd love to create a business around quicktype but we haven't figured that part out yet.