Re: Why JSON?

That one line puts a Javascript object into the variable 'mine' that  
corresponds to the JSON you serialised. You can walk it with normal  
Javascript . accessors, rather than attempting to parse the XML or  
somesuch. The 'eval' line takes the input as text, and the Javascript  
parser turns it into actual objects -- JavaScript Object Notation =  

If you're working with Javascript, Ruby, or a host of other languages  
(, JSON is vastly easier and less verbose than XML. If it  
fits the problem domain, use it.


On  6 Oct 2006, at 5:45 PM, Obrst, Leo J. wrote:

> Ok, Hans, assume I am an idiot about Javascript. What does that mean?
> var mine = eval ("(" + input + ")");
> Does it mean: evaluate the quoted string of the input value '+  
> input +'? When are the '+' operators evaluated, or are they  
> operators or delimiters? Let's assume they are operators. Are they  
> evaluated at 'eval' time?
> What's the semantics here? I know quotation in Lisp and even meta- 
> quotation, and evaluation at both of those, but I don't know what  
> you mean here.
> Mucho gracias!
> Leo

Received on Saturday, 7 October 2006 01:34:58 UTC