Back to the module list

Output JSON

The output JSON allow to return the provided data to a JSON format. It define the headers to inform the browser of th format.

The class definition

Class \outputjson

Namespace \

Description

 Display in JSON the data provided
 The data must NOT be binary !

Properties

No property available

Methods

public function __construct ()
 Don't allow to output in JSON if the functions are not available in PHP

public function out ($data)
 Display in JSOn the data provided
      @param mixed $data The data to be displayed