I want to use a jar to return JSON to a brower with or without simplejson (with appropriate headers), here is what I have so far used for my flash application:
@app.route('/') def hello_world(): QUERY_URL="http://someappserver:9902/myjsonservlet" result = simplejson.load(urllib.urlopen(QUERY_URL)) return result;
Assuming JSON output is returned:
{"myapplication":{"system_memory":21026160640.0,"percent_memory":0.34, "total_queue_memory":4744,"consumers":1,"messages_unacknowledged":0, "total_messages":0,"connections":1}
When I visit the page http://localhost:5000 , I get an Internal Server Error . What should I do with the βresultβ to display it accordingly? Or can I say that he came back with json headers?
When I add a print statement to print the result, I see JSON, but in the browser it gives me Internal Server Error .
source share