You want a JSON API for your web-service to enable mash-ups, avoid the problems posed by XMLHttpRequest (like security policies) and get a cleaner and faster data-retrieval experience.
Here are 3 things to remember so you get it right -
1. Use JSONP – JSONP provides a way to specify a callback function in the calling document to consume the JSON data provided by the server.
2. Return plain ol’ JSON if no Callback is specified
3. Provide a shorter and a longer version of your payload
Please feel free to add your tips to the comments.
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment