JSON with jQuery — a practical guide to jQuery JSON with clear examples you can reuse in real projects.
jQuery Tutorial Series (71/101). Prefer one article? Read the complete jQuery tutorial.
Short description
$.getJSON is a shortcut for GET + JSON parsing.
JSON
$.getJSON('/api/user', function (user) {
$('#name').text(user.name);
});
$.ajax({
url: '/api/user',
method: 'POST',
contentType: 'application/json',
data: JSON.stringify({ name: 'Asha' })
});