pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: New article on implementing and using web queries
Date Thu, 26 Aug 2010 12:17:44 GMT
Hi Chris,

Good to hear from you.

I find the optional quotes to be very convenient. I also find Pivot's support for single quotes
very convenient, and this is also not an official part of the JSON spec. Consider a style
declaration without that support:

<BoxPane styles="{&quot;horizontalAlignment&quot;:&quot;center&quot;, &quot;verticalAlignment&quot;:&quot;center&quot;,


<BoxPane styles="{horizontalAlignment:'center', verticalAlignment:'center', ...}"/>
> I don't think Pivot is doing the greater community any favours by
> encouraging this offshoot of JSON.  Pivot either needs to fix it, or call it
> something else, because as it stands (in its weak undelimited form) it's not
> JavaScript Object Notation, it's Pivot Object Notation.

JavaScript itself supports the same optional syntax - single quotes or no quotes (when the
key only contains valid identifier characters). Would you say that JavaScript has done the
software community a disservice? Would you call JavaScript's use of JSON "JavaScript Object
Notation"? Oh, wait...  ;-)

When JSON is produced and consumed exclusively by machine, requiring quotes may not seem like
a big deal. So I can see your argument with respect to the REST article, since it is about
web services. However, JSON is often authored by hand in Pivot, and as such needs to be more

I personally think the JSON spec itself should make quotes optional, and possibly also support
single quotes. Enforcing quotes when they are not strictly necessary is needlessly draconian.


View raw message