This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes is the below mention code json or javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "is the below mention code json or javascript?" Watch "is the below mention code json or javascript?" New topic
Author

is the below mention code json or javascript?

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1067

Dear Members,

Is the below mentioned code a json or javascript



http://www.lifesbizzare.blogspot.com || OCJP:81%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63026
    
  69

It's JavaScript. JSON is not code, it is an interchange format. Calling JSON code is a lot like calling XML "code".

JSON is based upon JavaScript object literal format, so the object literal part of that code does look a lot like JSON, but it's code, not data.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63026
    
  69

And may I add that txt is a horrid variable name.
 
Consider Paul's rocket mass heater.
 
subject: is the below mention code json or javascript?
 
It's not a secret anymore!