Ok, so as promised I ran some of the options we have that came up last
week by Douglas Crockford.

1. Document the fact that if you want to strictly conform to the JSON
   spec and be sure your json_encode output will work in various JSON
   parsers, you have to pass it a PHP array or object.

2. Remove support for basic types entirely and throw an error if you
   pass json_encode() something that is not an array or an object.

3. Wrap basic types in an array [] by default and perhaps add an option
   to json_encode() to skip the wrapper.

He would prefer option 1.

-Rasmus

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

Reply via email to