Download the PHP package aalfiann/json-class-php without Composer
On this page you can find all versions of the php package aalfiann/json-class-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package json-class-php
JSON Class PHP
A class for handle json in a better way.
Installation
Install this package via Composer.
Usage
Encode
Decode
Debug
You can easily debug with set property debug
to true
.
Chain Usage Example
Properties
$withlog=false,$sanitize=false,$ansii=false,$debug=false,$makesimple=false,$trim=false;
Chain Function
- withSanitizer($sanitize=true) this will sanitize your data array before execute json_encode.
- withTrim($trim=true) this will trimmed your data array or string before execute json_encode or json_decode.
- withLog($withlog=true) this will append the logger data into your json.
- setAnsii($ansii=true) this will make sanitizer works to handle ANSII chars.
- setDebug($debug=true) this is for debugging purpose.
- makeSimple($makesimple=true) this will hide the additional data in debug output.
Main Function
- encode($data,$options=0,$depth=512) encode array or string to json format.
- decode($json,$assoc=false,$depth=512,$options=0) decode json string to
stdClass/array
. - isValid($json=null) to determine json string is valid or not.
Helper Function
- convertToUTF8($string) convert string to valid UTF8 chars.
- convertToUTF8Ansii($string) convert string to valid UTF8 chars (support ANSII chars).
- trimValue($string) trim the data array or string to strip the whitespace or any characters consider to blank value.
- debug_encode($string,$options=0,$depth=512) debugger to test json encode.
- debug_decode($json,$assoc=false,$depth=512,$options=0) debugger to test json decode.
- errorMessage($jsonlasterror,$content) case error message about json.
- fixControlChar($string) Most common fixed hidden control char in json string which made json decode fails.
- modifyJsonStringInArray($data,$jsonfield,$setnewfield="") modify json data string in some field array to be nice json data structure.
- concatenate($data,$escape=true,$options=0,$depth=512) concatenate json data
- minify($json) Minify the json string
All versions of json-class-php with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4
The package aalfiann/json-class-php contains the following files
Loading the files please wait ....