On Sat, Jun 4, 2011 at 4:52 AM, David Zülke <david.zue...@bitextender.com> wrote: > Yes, I know. Then why are you and others demanding that the resulting syntax > be fully compatible with JSON so it could be parsed by other JSON parsers? > That makes no sense at all. A file with just ["foo"] in it won't be > interpreted by PHP; you need at least <?php ?> wrappers and a semicolon, and > then you can't just throw it at another JSON parser anymore.
I never demanded that anything resembling this. I simply stepped into this thread because of the encoding argument that ensued. > There is absolutely no use case for this, but some people on this thread seem > to have some weird dream where they can somehow share code between languages > or whatever. Which they can't. Unless they want to start stripping or padding > stuff and generating code. > > I was pointing out the encoding issue under the assumption that it somehow > *did* make sense, e.g. that you'd have a JSON compatible declaration > somewhere in a PHP file, extracted it with, say, a regex, and handed it to > PHP's own JSON parser, which might then struggle depending on the encoding of > the file. My impression was that people just wanted a JSON-like way to construct arrays and objects. Which does not require using a JSON parser, just the Zend parser. -Andrei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php