It's pretty simple.
string json_encode(mixed whatever)
mixed json_decode(string encoded_whatever)
It's just a serializer.
-Rasmus
Andi Gutmans wrote:
Hey,
I think having a JSON extension for PHP is a good idea. We have written
our own implementation in PHP for framework but could definitely benefit
from a C extension down the road if it gets widely adopted.
My only concern is that this is a very new extension and I haven't seen
any docs yet. So generally speaking I'd be a +1 but I prefer to be able
to first review docs, make sure APIs are reasonable and the best they
can be, and then keep it experimental for a while to make sure it's
stable (which would have probably been the case anyway).
Andi
At 11:31 AM 1/20/2006, Rasmus Lerdorf wrote:
pecl/json is a rather simple extension with no external deps (it
bundles the small library it uses). The JSON format is stable with no
real possibility of changing basically by definition, and I see its
use exploding this year. There is also talk to a JSON Request object
being added to browsers and if that happens we need to support that
natively much like we support url-encoded form data ending up directly
in $_POST. I could see a $_JSON if browsers start sending this. But,
as an initial step how about we bundle pecl/json in the next release?
There is an issue with the fact that it is LGPL'ed. But perhaps we
can work with Omar to put at least the extension part under the PHP
license when bundled with PHP.
-Rasmus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php