Esti Alvarez

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in rails API -> structuring JSON - best practices

Hi!

Did you find a good solution for this? jbuilder is apparently quite unperformant and gems like active_model_serializer don't seem to be being maintained anymore, I assume that because there is some other way of doing it in 2024. How do people customize JSON API format nowadays?

In my case, I have a model with (simplifying) name, destination_address and destination_zip_code columns and I'd like my json to look like this: {"name":"foo","destination":{"address":"bar","zip_code":"baz"}}

Can anybody point me to the right direction?

Thank you!