code: def json(self, data):
          
          self.write(json_.encode(data))
          self.set_header('Content-type', 'application/json')
docs: Encodes the dictionary being passed to JSON and sets the Header to application/json