# halaxa/json-machine

Efficient, easy-to-use, and fast PHP JSON stream parser

Repository: https://github.com/halaxa/json-machine
Canonical: https://ross.abutalabs.com/products/json-machine
Language: PHP
License: Apache-2.0
License Family: permissive
Topics: php, stream-processing, json-parser, json-iterator, json-stream, parsing
Last push: 2026-04-03T16:52:16+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 75, release rhythm 60, longevity 100
- inputs: {"age_days": 2858, "days_push": 152, "days_rel": 271, "gap_med": 21, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1326, forks 74 (observed 2026-08-28T04:04:22.746167+00:00)

## What it is
JSON Machine is a PHP library for memory-efficient streaming parsing of large JSON files and streams. It provides a simple iterator-based API as a drop-in replacement for json_decode when handling documents too big to fit in memory.

## Use cases
- parse large json files without exhausting memory
- stream json api responses in php
- iterate over huge json arrays item by item
- extract a subtree from a big json document with json pointer
- process 500MB json export files

## When to choose
- you need to parse JSON documents larger than available memory in PHP
- you want a simple foreach-based API over big JSON files or HTTP streams
- you need to parse streaming JSON responses from Guzzle or Symfony HttpClient

## When to avoid
- you need random access to JSON items by index
- your JSON documents are small enough for json_decode
- you are not working in PHP

## Facets
- artifact type: library
- maturity: stable
- function: parser, serialization, streaming
- domain: parsers, files, developer-tools
- platform: php, cli
- tags: json-streaming, memory-efficient, json-pointer, large-files, data-engineering

## Member repositories
- halaxa/json-machine (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.746167+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-30T04:46:22.068141+00:00, confidence not recorded.
  - readme: https://github.com/halaxa/json-machine (fetched 2026-08-28T04:04:22.746167+00:00, sha ac7b1b85548d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
