title: How to structure a server-side datasource that returns JSON objects?
body: <p>I'm currently new into client-side programming, especially using the Jquery Ajax method to call server-side methods.</p>
  
  <p>Until now I've used a System.Web.Services.WebService to host multiple methods to return a String or a bool. This approach has the advantage, that I can "group" methods with a similar purpose, like "methods for a comment-system". A disadvantage, as I've read many times, is that *.asmx services are outdated and the Json support isn't that well.</p>
  
  <p>I've always read that a good way to provide methods that return JSON objects is the use of generic handlers (*.ashx). Generic handlers that I've written in the past provided only one single "action" per handler.
  Is using generic handlers for a JSON datasource the way to go? I clearly see the disadvantage of not being able to "group" methods, because each method would be in a seperate .ashx.cs file. (I know that I could pass a second argument that determines which "action" should be called, but somehow doesn't feel right).</p>
  
  <p>Using a WCF service is not a worthwhile option at the moment, because the methods that I use need access to the session and adjusting a service to fit the same purpose is just an overkill for now.</p>
  
  <p>I guess the real question is: <strong>What is a modern way to return JSON objects / List of JSON objects while maintaining readability / structure of the service-side methods?</strong></p>
  
  <p><strong>Edit</strong>: I'm using Webforms 4.0</p>