json 형식으로 다음 코드를보고 싶습니다. 그렇게하면 내용이없는 빈 페이지가 표시됩니다. Rubymine 디버거에는 json 형식으로 올바른 정보가 있습니다.JSON in Rails
include Java
require 'net/http'
class PatientRecordController < 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