#41271 [Opn->Csd]: missing proto declarations for the json extension

From: Date: Fri, 25 May 2007 13:25:22 +0000
Subject: #41271 [Opn->Csd]: missing proto declarations for the json extension
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969376435@lists.php.net to get a copy of this message
ID: 41271 Updated by: bjori@php.net Reported By: jeffg at activestate dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: OS X PHP Version: Irrelevant New Comment: Thanks for the patch, fixed. Previous Comments: ------------------------------------------------------------------------ [2007-05-03 18:52:51] jeffg at activestate dot com Description: ------------ The json extension is missing proto doc strings for json_encode() and json_decode(), which causes source scanning scripts looking for these signatures to miss these two functions ( eg Rasmus' script ). A minor issue, but it would be nice if the json sources were more standardized. Here is a diff, using today's snap: --- php5.2-200705031830/ext/json/json.c 2007-04-13 15:31:12.000000000 -0700 +++ php5.2-snaps-altered/ext/json/json.c 2007-05-03 11:44:57.000000000 -0700 @@ -387,6 +387,9 @@ return; } +/* {{{ proto string json_encode(mixed $value) + Returns a string containing the JSON representation of value. */ + static PHP_FUNCTION(json_encode) { zval *parameter; @@ -403,6 +406,9 @@ smart_str_free(&buf); } +/* {{{ proto string json_decode(string $json [bool $assoc]) + Takes a JSON encoded string and converts it into a PHP variable. */ + static PHP_FUNCTION(json_decode) { char *parameter; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41271&edit=1

« previous php.doc (#969376435) next »