1 Repo
Manages the high-level organization of the JSON document, such as creating flat lists or nested structures via adapters.
Distinct from Structured Document Serialization: Candidates focus on documentation generators or DB exports; this is about the structural shape of an API response.
Explore 1 awesome GitHub repository matching web development · Document Structure Control. Refine with filters or upvote what's useful.
Active Model Serializers ist ein Ruby-on-Rails-JSON-Serializer, der verwendet wird, um Modellobjekte und Assoziationen in strukturierte JSON-Antworten für APIs umzuwandeln. Er fungiert als Modell-zu-JSON-Mapper und Response-Formatter, der interne Datenbankschemata von externen API-Verträgen entkoppelt. Das Projekt nutzt ein pluggbares Adapter-Muster, um serialisierte Daten gemäß spezifischen Standards, wie der JSON-API-Spezifikation, zu organisieren. Es bietet einen Mechanismus, um interne Attribute auf benutzerdefinierte JSON-Schlüssel abzubilden, und implementiert einen Serialisierungs-Scope, der Attribut- und Assoziationsfilterung basierend auf Autorisierungskontext und Benutzerberechtigungen ermöglicht. Das Toolset deckt Datentransformation durch die Verwendung virtueller Attribute und die Verwaltung assoziierter Daten via Sideloading oder ID-Embedding ab. Es enthält Funktionen für die Injektion von Response-Metadaten, fragmentbasiertes Caching von Ergebnissen und Performance-Instrumentierung zur Verfolgung von Serialisierungsmetriken.
Controls the final structure of the JSON response, allowing for flat lists or specific specification layouts.