And $, don't forget $ :-)
 
var obj = { $foo_bar$: 'howdy' };
 
-Mike


  _____  

From: Karl Swedberg


On Dec 31, 2008, at 7:51 AM, pete higgins wrote:



int and float are reserved words as well. Technically, you are
supposed to quote all keys (JSON), but in reality you only need to
quote the reserved ones. "default" gets me every time.




Hi Pete, 


I know you already know this, but just for completeness I thought I should
mention that you need to quote not only reserved-word keys but also keys
that have a character other than alphanumeric or underscore. 


--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com


Reply via email to