| Recommend this page to a friend! | 
| Info | Example | Reputation | Support forum | Blog | Links | 
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2025-01-27 (1 month 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 "JsonDecode.php";
// Creating json file handle
$fp = fopen('/usr/local/var/www/rnd/test.json', 'rb');
// Create JsonEncode Object.
$JsonDecode = new JsonDecode($fp);
$JsonDecode->init();
// Validate JSON
$JsonDecode->validate();
$jsonDecode = null;
<?php
require "JsonDecode.php";
// Creating json file handle
$fp = fopen('test.json', 'rb');
// Create JsonEncode Object.
$JsonDecode = new JsonDecode($fp);
$JsonDecode->init();
// Indexing JSON
$JsonDecode->indexJson();
// Transverse across key 'data'
if ($JsonDecode->isset('data') && $JsonDecode->jsonType('data') === 'Array') {
    for ($i=0, $i_count = $JsonDecode->count('data'); $i < $i_count; $i++) {
        $key = "data:{$i}";
        // Row details without Sub arrays
        $row = $JsonDecode->get($key);
        print_r($row);
        // Row with Sub arrays / Complete $key array recursively.
        $completeRow = $JsonDecode->getCompleteArray($key);
        print_r($completeRow);
    }
}
$jsonDecode = null;
| File | Role | Description | 
|---|---|---|
| Class | Heavy Json Decode | |
| Lic. | License text | |
| Example | Example script | 
| 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.