\PrivateBinJson

Json

Provides JSON functions in an object oriented way.

Summary

Methods
Properties
Constants
encode()
decode()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_detectError()
No private properties found
N/A

Methods

encode()

encode(mixed  $input) : string

Returns a string containing the JSON representation of the given input

Parameters

mixed $input

Throws

\Exception

Returns

string

decode()

decode(string  $input) : array

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

Parameters

string $input

Throws

\Exception

Returns

array

_detectError()

_detectError() : void

Detects JSON errors and raises an exception if one is found

Throws

\Exception