开发者

asynchttp and rhomobile

开发者_开发技巧

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜