ActiveModelSerializers brings convention over configuration to your JSON generation.
ActiveModelSerializers works through two components: serializers and adapters.
Serializers describe which attributes and relationships should be serialized.
Adapters describe how attributes and relationships should be serialized.
SerializableResource co-ordinates the resource, Adapter and Serializer to produce the resource serialization. The serialization has the #as_json, #to_json and #serializable_hash methods used by the Rails JSON Renderer. (SerializableResource actually delegates these methods to the adapter.)
By default ActiveModelSerializers will use the Attributes Adapter. But we strongly advise you to use JsonApi Adapter, which follows 1.0 of the format specified in jsonapi.org/format. Check how to change the adapter in the sections below.
ActiveModel::Serializers alternatives and related gems
Based on the "API Builder" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of ActiveModel::Serializers or a related project?
ActiveModel::Serializers RecommendationsThere are no recommendations yet. Be the first to promote ActiveModel::Serializers!
Have you used ActiveModel::Serializers? Share your experience. Write a short recommendation and ActiveModel::Serializers, you and your project will be promoted on Awesome Ruby.
Recently added ActiveModel::Serializers resources
Be the first to add one!