title: Render JSON in Rails
body: <p>I want to see the following code in json format.  When I do so I get a blank page with no content.  In the rubymine debugger I have the correct information in json format.</p>
  
  <pre><code>include Java
  
  require 'net/http'
  
  class PatientRecordController &lt; ApplicationController
  
    def index
      url = 'http://localhost:8080/patient/record/v2/'
      data_raw = Net::HTTP.get_response(URI.parse(url)).body
  
      @data_json = ActiveSupport::JSON.decode(data_raw)
  
      respond_to do |format|
        format.json {render json: @data_json}
      end
  
    end
  end
  </code></pre>