com.caucho.quercus.lib.json
Class JsonModule
java.lang.Object
com.caucho.quercus.module.AbstractQuercusModule
com.caucho.quercus.lib.json.JsonModule
- All Implemented Interfaces:
- QuercusModule
public class JsonModule
- extends AbstractQuercusModule
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSON_ERROR_NONE
public static final int JSON_ERROR_NONE
- See Also:
- Constant Field Values
JSON_ERROR_DEPTH
public static final int JSON_ERROR_DEPTH
- See Also:
- Constant Field Values
JSON_ERROR_STATE_MISMATCH
public static final int JSON_ERROR_STATE_MISMATCH
- See Also:
- Constant Field Values
JSON_ERROR_CTRL_CHAR
public static final int JSON_ERROR_CTRL_CHAR
- See Also:
- Constant Field Values
JSON_ERROR_SYNTAX
public static final int JSON_ERROR_SYNTAX
- See Also:
- Constant Field Values
JSON_ERROR_UTF8
public static final int JSON_ERROR_UTF8
- See Also:
- Constant Field Values
JSON_HEX_TAG
public static final int JSON_HEX_TAG
- See Also:
- Constant Field Values
JSON_HEX_AMP
public static final int JSON_HEX_AMP
- See Also:
- Constant Field Values
JSON_HEX_APOS
public static final int JSON_HEX_APOS
- See Also:
- Constant Field Values
JSON_HEX_QUOT
public static final int JSON_HEX_QUOT
- See Also:
- Constant Field Values
JSON_FORCE_OBJECT
public static final int JSON_FORCE_OBJECT
- See Also:
- Constant Field Values
JSON_NUMERIC_CHECK
public static final int JSON_NUMERIC_CHECK
- See Also:
- Constant Field Values
JSON_BIGINT_AS_STRING
public static final int JSON_BIGINT_AS_STRING
- See Also:
- Constant Field Values
JSON_PRETTY_PRINT
public static final int JSON_PRETTY_PRINT
- See Also:
- Constant Field Values
JSON_UNESCAPED_SLASHES
public static final int JSON_UNESCAPED_SLASHES
- See Also:
- Constant Field Values
JSON_UNESCAPED_UNICODE
public static final int JSON_UNESCAPED_UNICODE
- See Also:
- Constant Field Values
JsonModule
public JsonModule()
getLoadedExtensions
public java.lang.String[] getLoadedExtensions()
- Description copied from class:
AbstractQuercusModule
- Returns the extensions loaded by the module.
- Specified by:
getLoadedExtensions
in interface QuercusModule
- Overrides:
getLoadedExtensions
in class AbstractQuercusModule
json_encode
public static StringValue json_encode(Env env,
Value val,
int options)
- Returns a JSON-encoded String.
JSON strings can be in any Unicode format (UTF-8, UTF-16, UTF-32).
Therefore need to pay special attention to multi-char characters.
- Parameters:
env
- val
- to encode into json format
- Returns:
- String JSON-encoded String
json_decode
public static Value json_decode(Env env,
StringValue s,
boolean assoc)
- Takes a JSON-encoded string and returns a PHP value.
- Parameters:
env
- s
- JSON-encoded string.assoc
- determines whether a generic PHP object or PHP associative
array should be returned when decoding json objects.
- Returns:
- decoded PHP value.
json_last_error
public static int json_last_error(Env env)