diff options
Diffstat (limited to 'includes/api/ApiFormatJson_json.php')
-rw-r--r-- | includes/api/ApiFormatJson_json.php | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/includes/api/ApiFormatJson_json.php b/includes/api/ApiFormatJson_json.php index c15cdd8003d8..2cd87930b342 100644 --- a/includes/api/ApiFormatJson_json.php +++ b/includes/api/ApiFormatJson_json.php @@ -45,7 +45,7 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * -* @addtogroup Services_JSON +* @addtogroup API * @author Michal Migurski <mike-json@teczno.com> * @author Matt Knapp <mdknapp[at]gmail[dot]com> * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> @@ -91,26 +91,28 @@ define('SERVICES_JSON_LOOSE_TYPE', 16); define('SERVICES_JSON_SUPPRESS_ERRORS', 32); /** -* Converts to and from JSON format. -* -* Brief example of use: -* -* <code> -* // create a new instance of Services_JSON -* $json = new Services_JSON(); -* -* // convert a complexe value to JSON notation, and send it to the browser -* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); -* $output = $json->encode($value); -* -* print($output); -* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] -* -* // accept incoming POST data, assumed to be in JSON notation -* $input = file_get_contents('php://input', 1000000); -* $value = $json->decode($input); -* </code> -*/ + * Converts to and from JSON format. + * + * Brief example of use: + * + * <code> + * // create a new instance of Services_JSON + * $json = new Services_JSON(); + * + * // convert a complexe value to JSON notation, and send it to the browser + * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); + * $output = $json->encode($value); + * + * print($output); + * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] + * + * // accept incoming POST data, assumed to be in JSON notation + * $input = file_get_contents('php://input', 1000000); + * $value = $json->decode($input); + * </code> + * + * @addtogroup API + */ class Services_JSON { /** @@ -812,6 +814,9 @@ class Services_JSON if (class_exists('PEAR_Error')) { + /** + * @addtogroup API + */ class Services_JSON_Error extends PEAR_Error { function Services_JSON_Error($message = 'unknown error', $code = null, @@ -825,6 +830,7 @@ if (class_exists('PEAR_Error')) { /** * @todo Ultimately, this class shall be descended from PEAR_Error + * @addtogroup API */ class Services_JSON_Error { |