Do i do it like this?
import cyclone
class MyHandler(cyclone.web.RequestHandler):
def get(self, command):
details = {'status':'success'}
json = json_encode(details)
self.write(json)
Or is there more to it than that?
It's even less than that: You can simply use self.write(details)
if it you write a dict, it will be automatically converted to JSON.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With