Json

Implements FormatInterface

JSON format handler for Registry.

since

1.0.0

package

Joomla Framework

Methods

objectToString

Converts an object into a JSON formatted string.

objectToString( object, mixed||string|int options = []) : 
since

1.0.0

Arguments

object

objectData source object.

options

array<string|int, mixed>Options used by the formatter.

Response

stringJSON formatted string.

stringToObject

Parse a JSON formatted string and convert it into an object.

stringToObject( data, mixed||string|int options = ['processSections' => false]) : 

If the string is not in JSON format, this method will attempt to parse it as INI format.

throws

RuntimeException

since

1.0.0

Arguments

data

stringJSON formatted string to convert.

options

array<string|int, mixed>Options used by the formatter.

Response

objectData object.