Json
Implements FormatInterfaceJSON format handler for Registry.
since |
1.0.0 |
---|---|
package |
Joomla Framework |
Methods
objectToString
Converts an object into a JSON formatted string.
objectToString(object object, array options = []) : string
since |
1.0.0 |
---|
Arguments
- object
object
Data source object.- options
array
Options used by the formatter.
Response
string
JSON formatted string.
stringToObject
Parse a JSON formatted string and convert it into an object.
stringToObject(string data, array options = ['processSections' => false]) : object
If the string is not in JSON format, this method will attempt to parse it as INI format.
throws |
|
---|---|
since |
1.0.0 |
Arguments
- data
string
JSON formatted string to convert.- options
array
Options used by the formatter.
Response
object
Data object.