Had this exact issue with a legacy API last year. The Jackson solution works great, but if you’re stuck with Gson, just preprocess the JSON string with regex before parsing. Use jsonString.replaceAll("(\\w+):", "\"$1\":") to add quotes around unquoted keys. Not pretty, but it saved my ass when I couldn’t switch libraries mid-project. Watch out for nested objects though, and make sure your regex doesn’t quote already quoted keys.