Search code examples
restbackbone.jsrestkit

REST API : POST/PUT a JSON object VS POST/PUT Key/Value parameters


does anyone can help me to decide which is the best practice between :

  • using json object to POST/PUT on a REST API
  • using key/value parameters instead ?

I realized that Backbone.js and Restkit(IOS) are more json object post/put oriented, But when you want to do an open-third-Party API, how can you decide what is the best approach ?


Solution

  • I think you will win more fans by using JSON to send data.

    Servers don't return key/value pairs and mostly JSON or XML. So front end frameworks have took the initiative of using the same format for exporting as they do importing to keep things consistent.