| Form | Example | When to Use |
|---|---|---|
| New (symbol) | { status: 'ok' } |
✅ Rails default & preferred |
| Old (rocket) | { 'status' => 'ok' } |
When keys aren’t symbols (like strings or variables) |
Last active
October 29, 2025 22:51
-
-
Save giljr/0a2d1afb6c908ce24d14c62532d514a0 to your computer and use it in GitHub Desktop.
Mastering JSON Responses in Rails API Build, Render, and Test Structured Data with Confidence Using RSpec (https://medium.com/jungletronics/mastering-json-responses-in-rails-api-0cd5805d8351)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment