Re: Call for Votes: JSON location
| From: | Pierre | Date: | Sat, 08 Apr 2006 01:16:10 +0000 |
| Subject: | Re: Call for Votes: JSON location | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42152@lists.php.net to get a copy of this message | ||
On 4/8/06, Daniel Convissor <danielc@analysisandsolutions.com> wrote:
> So, you'd like to see PEAR's JSON package contain two functions with
> the following signatures:
>
> string json_encode ( mixed value )
> mixed json_decode ( string json, [bool assoc] )
>
> Should we have this package be an exception to the PEAR object
> oriented model and just provide those functions? Or should the file
> provide both the functions and an OO interface thereto? Guess it
> doesn't REALLY matter, but it seems better to keep it straight ahead
> and just provide the functions.
It does matter :)
There is no rule to say that a package must use a OO interface. It is
ofteh desired but it is not a requirement. This case is a perfect
example.
However, as Joschua said, the authors cannot simply drop the current
interface without breaking everything out there. Providing the two
functions is enough.
--Pierre