My ongoing struggle with stupidity and what is not valid JSON

So this was a frustrating lesson to learn – and please feel free to be entertained by my apparent stupidity.

I was trying to create my own JSON with an xAgent – seems easy enough. I created a simple output which looked like this

    'items': [
            'name': 'AK',
            'dc': 23

and when I fed it through my AJAX code it failed.

	dataType: 'json',
	url: ""+query
	//url: ''

But what was interesting is that it returned the data (e) correctly. I was baffled and frustrated for way too long.

So I finally asked he correct question of google (isn’t that always the case) and I found that was telling me the strings were incorrect…..

because JSON requires double ” and not single ‘


This worked – changed the single to double quotes.

    "items": [
            "name": "AK",
            "dc": 23

and I am apparently now less stupid that I was yesterday…….


Kathy recommends –

4 thoughts on “My ongoing struggle with stupidity and what is not valid JSON

  1. Actually, it makes you less ignorant than yesterday. Ignorance is the lack of knowledge, stupid is the lack of capacity. Since we share a ‘lack of capacity’, I can’t fault you for a ‘lack of knowledge’, especially when you share that knowledge!

    Thanks, Marky!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s