1 Repo
Maps internal model attribute names to different keys in the JSON output to decouple the API contract from the schema.
Distinct from Attribute-to-Specification Mapping: Candidates focus on HTML attributes or SAML mappings; this is for model-to-JSON key translation.
Explore 1 awesome GitHub repository matching web development · Attribute Key Mapping. 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.
Decouples the external API contract from the database schema by mapping internal attributes to custom JSON keys.