library php-json
Another realization of json encode/decode
quantum13/php-json
Another realization of json encode/decode
- Wednesday, May 20, 2015
- by quantum13
- Repository
- 0 Watchers
- 0 Stars
- 1 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 1 Open issues
- 1 Versions
- 0 % Grown
Since PHP/5.2.0 there is a feature json_encode() and json_decode(), but the choice of this class is preferable., (*1)
JSON::encode() features, (*2)
Not only works with UTF-8, but also with any other single-byte encodings (eg: windows-1251, koi8-r)
Is able to convert numbers represented a string data type into the corresponding numeric data types (optional)
Non-ASCII characters leave as is, and does not convert to \uXXXX.
JSON::decode() features, (*3)
Converts malformed JSON to well-formed JSON.
Hint: normalizes a "dirty" JSON string, coming from JavaScript (smart behavior -- only if necessary), (*4)