Skip to content Skip to sidebar Skip to footer

Is This A Json Array?

Is this a JSON array: http://flamencopeko.net/icons_ajax.php? Source: http://flamencopeko.net/icons_ajax.txt $urls = array(); foreach (glob(dirname(__FILE__) . '/ico/*.gif') as $fi

Solution 1:

What you've shown is a JSON object. It contains an array inside, but the entire thing is an object. Think of it this way-JSON could be a key-value data, making it an object, or it could be an array-single values, no keys such as

[1,2,3,"some string",34,"another string"]

What you've shown is a completely valid JSON object. Whether it will suit your needs-we cannot say. You could take a look at json.org for the exact specifications and what is considered a valid JSON.

Also any array passed on to json_encode() will output a valid JSON.

Solution 2:

I like to use the online json viewer at http://jsonviewer.stack.hu/ - which shows you have a valid json object; which you could use to see that it consists of some header info and an array of 406 images in the 'alls' array.

enter image description here

Post a Comment for "Is This A Json Array?"