PHPackages                             luminouslabs/json-machine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. luminouslabs/json-machine

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

luminouslabs/json-machine
=========================

Efficient, easy-to-use and fast JSON pull parser

0979↓100%PHP

Since Aug 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/luminouslabsbd/ll-json-machine)[ Packagist](https://packagist.org/packages/luminouslabs/json-machine)[ RSS](/packages/luminouslabs-json-machine/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

(README in sync with the code)

Very easy to use and memory efficient drop-in replacement for inefficient iteration of big JSON files or streams for PHP &gt;=8.0. See [TL;DR](#tl-dr). No dependencies in production except optional `ext-json`.

---

- [TL;DR](#tl-dr)
- [Introduction](#introduction)
- [Parsing JSON documents](#parsing-json-documents)
    - [Parsing a document](#simple-document)
    - [Parsing a subtree](#parsing-a-subtree)
    - [Parsing nested values in arrays](#parsing-nested-values)
    - [Parsing a single scalar value](#getting-scalar-values)
    - [Parsing multiple subtrees](#parsing-multiple-subtrees)
    - [What is JSON Pointer anyway?](#json-pointer)
- [Options](#options)
- [Parsing streaming responses from a JSON API](#parsing-json-stream-api-responses)
    - [GuzzleHttp](#guzzlehttp)
    - [Symfony HttpClient](#symfony-httpclient)
- [Tracking the progress](#tracking-parsing-progress)
- [Decoders](#decoders)
    - [Available decoders](#available-decoders)
- [Error handling](#error-handling)
    - [Catching malformed items](#malformed-items)
- [Parser efficiency](#on-parser-efficiency)
    - [Streams / files](#streams-files)
    - [In-memory JSON strings](#in-memory-json-strings)
- [Troubleshooting](#troubleshooting)
    - ["I'm still getting Allowed memory size ... exhausted"](#step1)
    - ["That didn't help"](#step2)
    - ["I am still out of luck"](#step3)
- [Installation](#installation)
- [Development](#development)
    - [Non containerized](#non-containerized)
    - [Containerized](#containerized)

---

TL;DR
-----

[](#tldr)

```
