[OpenLayers-Users] specifying options for OL class
properties--when to use quotes?
Christopher Schmidt
crschmidt at metacarta.com
Thu Jul 24 20:02:13 EDT 2008
On Fri, Jul 25, 2008 at 01:37:37AM +0200, Kristian Thy wrote:
> On Thu, Jul 24, Christopher Schmidt wrote:
> > On Thu, Jul 24, 2008 at 06:07:02PM -0500, Erik Uzureau wrote:
> > > it was explained to me at some point in life that the "proper" JSON
> > > notation was
> > > putting quotes (single?) around the key names, ie:
> >
> > "Double", but I never let that affect my Javascript.
>
> Single and double quotes are interchangeable (as long as they match in
> pairs :-) ) in Javascript, just as in (X)HTML.
JSON is not Javascript.
JSON is a subset of Javascript, and single quotes are not allowed.
(As far as I know, all Javascript JSON parsers support single-quoted
keys/values, but most other implementations do not.)
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list