I don't think anyone cares about JSON for the sake of being perfect JSON, I 
didn't intend to give that impression. I'm only hoping for something that 
generally works on par with all the other JSON parsers in the world. In other 
words something with roughly the same syntax, constraints, and flexibility as 
the average browser based JavaScript implementation. Making JSON some special 
totally separate object type would totally miss the point and meaning of any 
developer writing such code. Yes, JSON is a very specific encoding, but when a 
developer writes something "jsony", what they mean is "an object/array with the 
following structure/values", because that is what the encoding really 
represents.

John Crenshaw
Priacta, Inc.

-----Original Message-----
From: dukeofgaming [mailto:dukeofgam...@gmail.com] 
Sent: Wednesday, June 01, 2011 6:52 PM
To: Michael Shadle
Cc: Sean Coates; Anthony Ferrara; PHP internals
Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

I still don't get it, the idea of making it look like json wont make it
json, it will be PHP, and if you dare to write you "jsony" object/array with
single quoted strings wont break the code even when its not JSON.

I'll say it again: not even Javascript supports 100% valid JSON. I'll say it
even more times:

Not even Javascript supports 100% valid JSON
Not even Javascript supports 100% valid JSON
Not even Javascript supports 100% valid JSON
Not even Javascript supports 100% valid JSON
Not even Javascript supports 100% valid JSON

JSON even has its own mime type. The idea of JSON as a first-class citizen
is a fallacy IMHO. The concept itsel is not ugly, but for god's sake, lets
put it in a separate RFC and lets decide con the actual RFC. Perhaps the
JSON idea could benefit from autoboxing and a native class?:
https://wiki.php.net/rfc/autoboxing

JSON is a serializarion format, not a data structure, you coud write an
associative array and if PHP knew the way, it could be autointerpreted as
JSON, no need to make PHP code look like JSON. I think that the *BEHAVIOR*
 of arrays/objects as JSON and without the intervention of serialization
functions should be in a separate RFC. There is really no point to make PHP
*look* like JSON to handle JSON natively .

This JSON matter and short array/object syntax are different issues just the
way "<?=" and "<?" were.

Could someone get Douglas Crockford in here?, rofl.

Regards,

David

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

Reply via email to