code: def write(self, obj):
          
          accept = self.request.headers.get("Accept")
          if "json" in accept:
              if JsonDefaultHandler.__parser is None:
                  JsonDefaultHandler.__parser = Parser()
              super(JsonDefaultHandler, self).write(JsonDefaultHandler.__parser.encode(obj))
              return
          # If we are not in json mode
          super(JsonDefaultHandler, self).write(obj)
docs: Print object on output