public class JsonModule extends AbstractQuercusModule
Modifier and Type | Field and Description |
---|---|
static int |
JSON_BIGINT_AS_STRING |
static int |
JSON_ERROR_CTRL_CHAR |
static int |
JSON_ERROR_DEPTH |
static int |
JSON_ERROR_NONE |
static int |
JSON_ERROR_STATE_MISMATCH |
static int |
JSON_ERROR_SYNTAX |
static int |
JSON_ERROR_UTF8 |
static int |
JSON_FORCE_OBJECT |
static int |
JSON_HEX_AMP |
static int |
JSON_HEX_APOS |
static int |
JSON_HEX_QUOT |
static int |
JSON_HEX_TAG |
static int |
JSON_NUMERIC_CHECK |
static int |
JSON_PRETTY_PRINT |
static int |
JSON_UNESCAPED_SLASHES |
static int |
JSON_UNESCAPED_UNICODE |
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
JsonModule() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getLoadedExtensions()
Returns the extensions loaded by the module.
|
static Value |
json_decode(Env env,
StringValue s,
boolean assoc)
Takes a JSON-encoded string and returns a PHP value.
|
static StringValue |
json_encode(Env env,
Value val,
int options)
Returns a JSON-encoded String.
|
static int |
json_last_error(Env env) |
protected static void |
setErrorLast(Env env,
int code) |
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions
public static final int JSON_ERROR_NONE
public static final int JSON_ERROR_DEPTH
public static final int JSON_ERROR_STATE_MISMATCH
public static final int JSON_ERROR_CTRL_CHAR
public static final int JSON_ERROR_SYNTAX
public static final int JSON_ERROR_UTF8
public static final int JSON_HEX_TAG
public static final int JSON_HEX_AMP
public static final int JSON_HEX_APOS
public static final int JSON_HEX_QUOT
public static final int JSON_FORCE_OBJECT
public static final int JSON_NUMERIC_CHECK
public static final int JSON_BIGINT_AS_STRING
public static final int JSON_PRETTY_PRINT
public static final int JSON_UNESCAPED_SLASHES
public static final int JSON_UNESCAPED_UNICODE
public java.lang.String[] getLoadedExtensions()
AbstractQuercusModule
getLoadedExtensions
in interface QuercusModule
getLoadedExtensions
in class AbstractQuercusModule
public static StringValue json_encode(Env env, Value val, int options)
env
- val
- to encode into json formatpublic static Value json_decode(Env env, StringValue s, boolean assoc)
env
- s
- JSON-encoded string.assoc
- determines whether a generic PHP object or PHP associative
array should be returned when decoding json objects.public static int json_last_error(Env env)
protected static void setErrorLast(Env env, int code)