file-fetcher
Static Public Member Functions | List of all members
PHPUnit\Util\Json Class Reference

Static Public Member Functions

static prettify (string $json)
 
static canonicalize (string $json)
 

Member Function Documentation

◆ canonicalize()

static PHPUnit\Util\Json::canonicalize ( string  $json)
static

To allow comparison of JSON strings, first process them into a consistent format so that they can be compared as strings.

Returns
array ($error, $canonicalized_json) The $error parameter is used to indicate an error decoding the json. This is used to avoid ambiguity with JSON strings consisting entirely of 'null' or 'false'.

◆ prettify()

static PHPUnit\Util\Json::prettify ( string  $json)
static

Prettify json string

Exceptions

The documentation for this class was generated from the following file: