I'm not sure that js->PHP is that critical (in terms of getting clever with objects etc), doing standard HTTP GET/POST requests with urlencoded values into $_GET/$_POST, 99% of the time is far more efficient way of sending data to the server, and alot easier to debug.. You can also implement the filter code on that data....

JSON in general looks far better suited to the PHP->js layer..

Regards
Alan

Douglas Crockford wrote:

I guess I am confused. Javascript, and thus JSON, has no concept of an object. It has something it calls an object, but that is just an associative array. Are you trying to layer some other syntax on top of JSON to convey more meaning than what JSON/Javascript natively supports?

JavaScript does have a concept of an object in its prototype chain. However, it is not captured in JSON, so the part about JSON's object being just an associative array is correct.
It makes sense to me that JSON->PHP would produce an associate array.
Independent of that, it might be convenient to have a tool that maps
associative arrays into objects, but that is not a JSON operation.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to