code: def write_json(self, **kwargs):
          
          self.stdout.write(json.dumps(kwargs) + "\n")
          self.stdout.flush()
docs: Write an JSON object on a single line.
  
          The keyword arguments are interpreted as a single JSON object.
          It's not possible with this method to write non-objects.