How can i display JSON data in a rhomobile application without saving it to a database?
thanks
use AsyncHttp
def index
Rho::AsyncHttp.get(
:url => "http://someurlx.com",
:callback => :parse)
end
def parse
body= @params['body']
@@json_data = Rho::JSON.parse(body)
end
To display JSON data the best method is what I found here
Try this one to get json without callback url
@response=Rho::AsyncHttp.get(
:url => "http://rhostore.herokuapp.com/customers.json"
)
json_parse=JSON.parse(@response)
精彩评论