Documentation

Json
in package

Json

Provides JSON functions in an object oriented way.

Table of Contents

Methods

decode()  : mixed
Returns an array with the contents as described in the given JSON input
encode()  : string
Returns a string containing the JSON representation of the given input
_detectError()  : void
Detects JSON errors and raises an exception if one is found

Methods

decode()

Returns an array with the contents as described in the given JSON input

public static decode(string $input) : mixed
Parameters
$input : string
Tags
access

public

static
throws
Exception

encode()

Returns a string containing the JSON representation of the given input

public static encode(mixed $input) : string
Parameters
$input : mixed
Tags
access

public

static
throws
Exception
Return values
string

_detectError()

Detects JSON errors and raises an exception if one is found

private static _detectError() : void
Tags
access

private

static
throws
Exception

        
On this page

Search results