Json

I’m doing this test

http://cfusion.hgtv.com/feeq/fee.html

if I put this in my JavaScript,


{"items": [
{
"title": "sample 1",
"author": "author 1"
},
{
"title": "sample 2",
"author": "author 2"
}
]}

it throws an error

only works if I do


 var jsonTest = {"items": [
	{
	"title": "sample 1",
	"author": "author 1"
	},
	{
	"title": "sample 2",
	"author": "author 2"
	}
]}

would this be ok??
(code sample in test throws error…)

also, this is the syntax in JSON site:
http://www.json.org/js.html
(with var decl in front)

thank you…

The page you linked to only displays the JSON…not the javascript surrounding it in order to make it work. Technically, it’s not an error–just an omission that’s up to you to figure out.

grand… :wink:

ok, thank you…