You can view JSON information related to a page component:
http://docs.adobe.com/docs/en/cq/current/developing/pageinfo.html
If you want a component to return JSON data, code it that way. That is - use JSP app logic to encode data as JSON.
You can develop an AEM Sling Servlet to encode data as JSON too. We have a community article that highlights this use case:
http://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html