Hacker News new | past | comments | ask | show | jobs | submit login

Don't decode into maps. If you don't want to create a struct, use an anonymous struct.

The only case I can think of making sense is when you deal with JSON that can change shape under your feet (like when dealing with shitty APIs that sometimes returns {}, sometimes []).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: