include/JSON.php
\JSON
Package: SugarCRM
This class used to perform json encode / decode functions but has now been replaced by the built in php.
Note: We no longer eval our json so there is no more need for security envelopes. The parameter has been left for backwards compatibility.
- Api
Methods

decode(
string $string, bool $examineEnvelope
=
false, bool $assoc
=
true
)
:
string
static
JSON decode a string
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $string | string | |
| $examineEnvelope | bool | Default false, true to extract and verify envelope |
| $assoc | bool |
| Type | Description |
|---|---|
| string |

decodeReal(
$string
)
:
void
static
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $string |
- Deprecated
- use JSON::decode() instead

encode(
string $string, bool $addSecurityEnvelope
=
false, bool $encodeSpecial
=
false
)
:
string
static
JSON encode a string
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $string | string | |
| $addSecurityEnvelope | bool | defaults to false |
| $encodeSpecial | bool |
| Type | Description |
|---|---|
| string |