-1

How can i display JSON data in a rhomobile application without saving it to a database?

thanks

femi
  • 974
  • 2
  • 13
  • 44

3 Answers3

0

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
Jorge Zuverza
  • 885
  • 8
  • 26
0

To display JSON data the best method is what I found here

Sivanand Kheti
  • 2,209
  • 1
  • 17
  • 29
0

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)
visnu
  • 935
  • 6
  • 16