Actions

API16

JRegistryFormatJSON/objectToString

From Joomla! Documentation

< API16:JRegistryFormatJSON
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Converts an object into a JSON formatted string. Unfortunately, there is no way to have ini values nested further than two levels deep. Therefore we will only go through the first two levels of the object.


[Edit Descripton]

Description:JRegistryFormatJSON/objectToString

Syntax

objectToString($object, $params)
Parameter Name Default Value Description
$object Data source object.
$params Options used by the formatter.

Returns

string JSON formatted string.

Defined in

libraries/joomla/registry/format/json.php

Importing

jimport( 'joomla.registry.format.json' );

Source Body

public function objectToString($object, $params)
{
        return json_encode($object);
}

[Edit See Also] SeeAlso:JRegistryFormatJSON/objectToString

Examples

<CodeExamplesForm />