JSON library
Standalone JSON capabilities
JSON, JSON Lines, and NDJSON features for application data pipelines.
The JSON library converts arrays and workbook-shaped payloads through the shared row-session model. It also supports line-delimited streaming and deterministic structured output.
- Package
- 1 JSON
- Capabilities
- 9 Documented for this library
- Feature groups
- 3 Package-specific responsibilities
What you will learn
- Compare normal JSON and line-delimited processing.
- Understand workbook-shaped JSON support and boundaries.
- Open the matching package-specific implementation guide.
What this library includes
This page is limited to mnb/mnb-phpexcel-json. Features from the monolithic package or another individual library are not mixed into this list.
composer require mnb/mnb-phpexcel-json:^2.0Mnb\PHPExcel\Format\JsonPackage quick start
The example uses the individual-library API documented by this feature page.
<?php
require __DIR__ . '/vendor/autoload.php';
use Mnb\PHPExcel\Format\Json;
$rows = Json::read('events.ndjson', [
'streaming_columns' => ['id', 'type', 'created_at'],
])->withHeaderRow(1)->rows();
Json::write($rows, 'events.json');Supported capabilities
Search the capabilities owned by this package and open the matching package-specific guide.
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Top-level array documents | Read arrays of records through normalized row sessions. | API payload imports | Supported | Open guide |
| Workbook-shaped JSON | Represent named logical sheets and select them through sheet APIs. | Structured application exports | Supported | Open guide |
| JSON Lines and NDJSON streaming | Process one object per line with record-size and schema controls. | Logs and event feeds | Supported | Open guide |
| Header and column normalization | Pin deterministic columns, handle extra keys, and project fields. | Stable ingestion schemas | Supported | Open guide |
| Typed scalar preservation | Keep JSON numbers, booleans, nulls, strings, arrays, and objects according to options. | Application data exchange | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Array and object output | Write normalized rows to formatted or compact JSON. | REST and file integrations | Supported | Open guide |
| Workbook-shaped output | Serialize multiple logical sheets through the workbook writer. | Multi-section data packages | Supported | Open guide |
| JSONL and NDJSON output | Emit records incrementally for streaming consumers. | Queues and analytics pipelines | Supported | Open guide |
| Feature | What it does | Typical use | Support | Guide |
|---|---|---|---|---|
| Per-record size limits | Reject oversized line-delimited records before excessive memory use. | Untrusted feeds | Supported | Open guide |
No matching feature found in this library.
Feature boundaries
These limits prevent individual-library documentation from being confused with the complete monolithic package.
| Capability | Status | What to use instead |
|---|---|---|
| Spreadsheet presentation | Not supported: JSON does not carry Excel styles, images, charts, or worksheet protection. | JSON does not carry Excel styles, images, charts, or worksheet protection. |
| Formula calculation | Not supported: Formula semantics are not evaluated by the JSON package. | Formula semantics are not evaluated by the JSON package. |
| Database persistence | Not supported: Combine with the Database package when rows must be validated and inserted through PDO. | Combine with the Database package when rows must be validated and inserted through PDO. |
Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue