include/JSON.php

Show: inherited
Table of Contents

\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

methodpublicdecode( string $string, bool $examineEnvelope = false, bool $assoc = true ) : string
static

JSON decode a string

Parameters
Name Type Description
$string string
$examineEnvelope bool

Default false, true to extract and verify envelope

$assoc bool
Returns
Type Description
string
methodpublicdecodeReal(  $string ) : void
static

Parameters
Name Type Description
$string
Details
Deprecated
use JSON::decode() instead  
methodpublicencode( string $string, bool $addSecurityEnvelope = false, bool $encodeSpecial = false ) : string
static

JSON encode a string

Parameters
Name Type Description
$string string
$addSecurityEnvelope bool

defaults to false

$encodeSpecial bool
Returns
Type Description
string
methodpublicencodeReal(  $string ) : void
static

Parameters
Name Type Description
$string
Details
Deprecated
use JSON::encode() instead  
Documentation was generated by DocBlox 0.18.1.