2
votes
2answers
170 views

Best pratice for return json in a REST application?

I'm starting now with REST (using Laravel 4.2) and Mobile (Android, iOS, SP, etc.) applications. Initially I'm checking if the request is ajax/json and then return a json response. But this ...
1
vote
4answers
340 views

Why returning XML/JSON for API requests, can't we just directly process request and return the modified web page (HTML/CSS/JS)?

Let's say that a user requests for some piece of data. Usually the data is processed via a server and then returned in XML/JSON format. Im guessing another piece of processing happens to convert it ...
6
votes
4answers
685 views

Building a web application that is almost completely rendered by Javascript, while back end only delivers Json. Do or don't?

As a programmer, and taking into account the overall "funness" of the process, I'm tempted to start a project in Sinatra where the back end's sole concern is the logic, and returning a Json API, and ...
2
votes
4answers
476 views

Should an API platform enforce only receiving JSON requests?

I am building an API platform. I have already ensured that the platform always returns JSON responses. My question is Should my API platform enforce the rule that all requests must be JSON? What ...
1
vote
1answer
138 views

Security using jsonp

I'm writing an app that will make available a set of api functions that require cross site scripting to work. I'll be utilizing jsonp which will allow other developers to consume these services for ...
4
votes
4answers
4k views

Always return single objects in an array for REST API JSON payloads?

For a REST API that I am working on, I want to return JSON in a consistent layout: { "Data" : { "Id" : 123, "Email" : "charlie@somewhere.com" "Firstname" : "Charlie", "Surname" ...
1
vote
1answer
225 views

ChunkDB to handle high traffic JSON web service? Alternatives?

I am designing a high volume web service which will rely on a central database containing objects of a single JSON type. Currently I am considering using ChunkDB to store the objects and retrieve the ...