Class: atkJSON
Source Location: /utils/class.atkjson.inc
Class atkJSON
Class Overview
|
ATK JSON wrapper.
Small wrapper around the PHP-JSON and JSON-PHP libraries. If you don't have the PHP-JSON C library installed this class will automatically fallback to the JSON-PHP PHP library. It's recommended to install the C library because it's much faster. More information: - http://pear.php.net/pepr/pepr-proposal-show.php?id=198
- http://www.aurore.net/projects/php-json/
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. This feature can also be found in Python. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, TCL, and many others. These properties make JSON an ideal data-interchange language.
Located in /utils/class.atkjson.inc [line 44]
Wiki documentation
Author(s):
Information Tags:
|
Methods
|
Method Summary
| static
Services_JSON
|
&_getJSONService() |
Get JSON service object. This method should never be called directly! |
| mixed |
decode() |
Decode JSON string. |
| string |
encode() |
Encode to JSON. |
Methods
static Services_JSON &_getJSONService(
[bool
$assoc = false]
)
|
|
Get JSON service object. This method should never be called directly!
Parameters:
|
bool |
$assoc: |
return as associative array (instead of objects) |
API Tags:
| Return: | JSON service object |
Information Tags:
mixed decode(
string
$string, [boolean
$assoc = false]
)
|
|
Decode JSON string.
Parameters:
|
string |
$string: |
JSON string |
|
boolean |
$assoc: |
return as associative array (instead of objects) |
API Tags:
string encode(
mixed
$var
)
|
|
Encode to JSON.
Parameters:
API Tags: