Sunday, October 21, 2012

How to render JSON in rhodes mobile framework

Currently I am using Rhodes framework to build mobile applications. Recently I just figured out how to request an Ajax call from view, and controller how to render a JSON object and return it to the view.

Sample code
Ajax call to request json object using jQuery:

code of rending json in controller

I found this solution in the Rhomobile launchpad forum, it works perfectly.
This exactly looks like render json behaviour in Ruby on Rails.

No comments:

Post a Comment