# cweiske/jsonmapper

Map nested JSON structures onto PHP classes

Repository: https://github.com/cweiske/jsonmapper
Canonical: https://ross.abutalabs.com/products/jsonmapper
Language: PHP
License: OSL-3.0
License Family: other
Topics: php, json, hydration, deserialization
Last push: 2026-06-30T04:12:07+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 90, release rhythm 35, longevity 100
- inputs: {"age_days": 4601, "days_push": 64, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1573, forks 185 (observed 2026-08-28T04:05:05.664756+00:00)

## What it is
A PHP library that maps nested JSON structures onto PHP model classes using type declarations and docblock annotations. It converts JSON API responses into typed objects and arrays without requiring schema files or JSON-specific code in your models.

## Use cases
- deserialize JSON API responses into PHP objects
- hydrate nested JSON data into typed model classes
- convert JSON web service data to objects with IDE autocompletion
- map JSON arrays to lists of PHP class instances
- keep model classes stable when the JSON API changes
- parse property types from docblocks and type hints automatically

## When to choose
- you want typed PHP objects from JSON without writing mapping code
- your model classes already have docblock or property type annotations
- you need a dependency-free deserialization library
- you want IDE autocompletion and comfort methods on your data models

## When to avoid
- you want model classes auto-generated from a JSON schema
- you need serialization in the other direction (objects to JSON)
- you use a framework with built-in JSON mapping (e.g. Symfony serializer)
- you cannot write model classes by hand

## Facets
- artifact type: library
- maturity: stable
- function: serialization
- domain: developer-tools, web-development, apis
- platform: php
- tags: -mapper, hydration, deserialization, object-mapping, no-dependencies

## Member repositories
- cweiske/jsonmapper (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:05.664756+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-30T03:58:02.897278+00:00, confidence not recorded.
  - readme: https://github.com/cweiske/jsonmapper (fetched 2026-08-28T04:05:05.664756+00:00, sha 6c6cb5ee529a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
