# lyft/mapper

A JSON deserialization library for Swift

Repository: https://github.com/lyft/mapper
Canonical: https://ross.abutalabs.com/products/lyft-mapper
Language: Swift
License: Apache-2.0
License Family: permissive
Topics: lyft
Archived: true
Last push: 2024-05-17T01:37:34+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3968, "days_push": 839, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1164, forks 88 (observed 2026-08-28T04:03:49.801716+00:00)

## What it is
Mapper is a Swift library for deserializing JSON into strongly typed Swift objects via a Mappable protocol. It supports immutable properties, optional fields, nested objects, enums, and custom transformations.

## Use cases
- deserialize json api responses into swift structs
- map json to model objects in ios app
- parse json with immutable properties in swift
- convert nested json into typed swift objects
- handle optional json fields in swift models
- custom json field transformations in swift

## When to choose
- you want simple, lightweight json-to-model mapping in Swift
- you need immutable model properties after deserialization
- you prefer protocol-based mapping over key-path codables

## When to avoid
- you can rely on Swift's built-in Codable instead
- you need serialization back to JSON, not just deserialization
- your project is not Swift/iOS

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, parser
- domain: developer-tools, mobile-development, apis
- platform: -
- tags: json-deserialization, swift, model-mapping, immutable-models, cocoapods, carthage, ios, mobile

## Member repositories
- lyft/mapper (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:49.801716+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:31:29.873217+00:00, confidence not recorded.
  - readme: https://github.com/lyft/mapper (fetched 2026-08-28T04:03:49.801716+00:00, sha 82cf7cf6ea0a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
