Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-10-05 (2 days ago) | Not enough user ratings | Total: 14 This week: 2 | All time: 11,371 This week: 23 |
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('/usr/local/var/www/rnd/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++) {
$row = $JsonDecode->get('data:'.$i);
print_r($row);
}
}
$jsonDecode = null;
Files (4) |
File | Role | Description |
---|---|---|
composer.json | Data | Auxiliary data |
JsonDecode.php | Class | Heavy Json Decode |
LICENSE | Lic. | License text |
README.md | 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. |
Install with Composer |
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.