Available in Chrome 42+ | View on GitHub | Browse Samples
This sample shows how the Fetch API can retrieve and deserialize a JSON-encoded Object.
fetch('users.json').then(function(response) {
return response.json();
}).then(function(json) {
ChromeSamples.log('Parsed JSON from the response:', json);
}).catch(function(ex) {
ChromeSamples.log('Parsing failed:', ex);
});