| Recommend this page to a friend! |
| Info | Example | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2026-02-28 (14 hours ago) | Not enough user ratings | Total: 21 | All time: 11,324 This week: 40 | |||||
| Version | License | PHP version | Categories | |||
| heavyjsondecode 1.0 | MIT/X Consortium ... | 5 | PHP 5, Data types, Parsers |
| Description | Author | |
This class can parse and decode JSON data from a file or string. |
PHP JSON Decode large data with lesser resources
<?php
require_once __DIR__ . '/AutoloadJsonDecode.php';
use CustomJsonDecode\JsonDecoder;
// Creating json file handle
$fp = fopen('/usr/local/var/www/rnd/test.json', 'rb');
// Create JsonDecode Object.
JsonDecoder::init($fp);
$jsonDecodeObj = JsonDecoder::getObject();
// Validate JSON
$jsonDecodeObj->validate();
$jsonDecodeObj = null;
<?php
require_once __DIR__ . '/AutoloadJsonDecode.php';
use CustomJsonDecode\JsonDecoder;
// Creating json file handle
$fp = fopen('/usr/local/var/www/rnd/test.json', 'rb');
// Create JsonDecode Object.
JsonDecoder::init($fp);
$jsonDecodeObj = JsonDecoder::getObject();
// Indexing JSON
$jsonDecodeObj->indexJson();
// Transverse across key 'data'
if (
$jsonDecodeObj->isset('data') && $jsonDecodeObj->jsonType('data') === 'Array'
) {
for ($i = 0, $iCount = $jsonDecodeObj->count('data'); $i < $iCount; $i++) {
$key = "data:{$i}";
// Row details without Sub arrays
$row = $jsonDecodeObj->get($key);
print_r($row);
// Row with Sub arrays / Complete $key array recursively.
$completeRow = $jsonDecodeObj->getCompleteArray($key);
print_r($completeRow);
}
}
$jsonDecodeObj = null;
Issues and feature requests are welcome.<br /> Feel free to share them on issues page
? Ramesh N. Jangid (Sharma)
Copyright © 2026 Ramesh N. Jangid (Sharma).<br /> This project is MIT licensed.
| File | Role | Description | ||
|---|---|---|---|---|
| Class | Class source | |||
| Aux. | Configuration script | |||
| Lic. | License text | |||
| Example | Example script | |||
| / | CustomJsonDecode |
| File | Role | Description |
|---|---|---|
| |
Class | Class source |
| |
Class | Class source |
| |
Class | Class source |
| |
Class | Class source |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% |
|
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.