You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I'm trying to migrate from gem "jsonapi-serializer" to OJ, but I need to do some changes that i'm, not sure the best way to do.
let's check the diference of body:
from jsonapi-serializer
So, with that, I create a new serializer using Og::Serializer, and I camelize with transform_keys :camelize, but I need to add id, attributes and attributes inside a hash, and all this inside a data key
This discussion was converted from issue #30 on May 16, 2024 17:51.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys, I'm trying to migrate from
gem "jsonapi-serializer"
to OJ, but I need to do some changes that i'm, not sure the best way to do.let's check the diference of body:
from jsonapi-serializer
So, with that, I create a new serializer using Og::Serializer, and I camelize with transform_keys :camelize, but I need to add id, attributes and attributes inside a hash, and all this inside a data key
I tried something like this for data
And it works, but I still need to improve this serializer to my json have the same attributes that using jsonapi serializer
Any ideias here?
Beta Was this translation helpful? Give feedback.
All reactions