Services_JSON
class Services_JSON
// Constructor: function Object() { [native code] } Converts to and from JSON format.
Methods 13 methods
| Method / Return | Description |
|---|---|
| __construct() void | constructs a new JSON instance
Parameters: $use: mixed |
| Services_JSON() void | PHP4 constructor.
Parameters: $use: mixed |
| utf162utf8() string | convert a string from one UTF-16 char to one UTF-8 char
Parameters: $utf16: mixed |
| utf82utf16() string | convert a string from one UTF-8 char to one UTF-16 char
Parameters: $utf8: mixed |
| encode() mixed | encodes an arbitrary variable into JSON format (and sends JSON Header)
Parameters: $var: mixed |
| encodeUnsafe() mixed | encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!)
Parameters: $var: mixed |
| _encode() mixed | PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format
Parameters: $var: mixed |
| name_value() string | array-walking function for use in generating JSON-formatted name-value pairs
Parameters: $name: mixed, $value: mixed |
| reduce_string() string | reduce a string by removing leading and trailing comments and whitespace
Parameters: $str: mixed |
| decode() mixed | decodes a JSON string into appropriate variable
Parameters: $str: mixed |
| isError() void | No description available.
Parameters: $data: mixed, $code: mixed |
| strlen8() integer | Calculates length of string in bytes
Parameters: $str: mixed |
| substr8() integer | Returns part of a string, interpreting $start and $length as number of bytes.
Parameters: $string: mixed, $start: mixed, $length: mixed |
Properties
| Property / Type | Description |
|---|---|
| $use mixed public | No description available. |
| $_mb_strlen mixed public | No description available. |
| $_mb_substr mixed public | No description available. |
| $_mb_convert_encoding mixed public | No description available. |