(self, header, line)
Each line as a JSON object with a trailing comma.  Blobs are
        output as base64 encoded strings.  You should be using UTF8
        output encoding.
Each line as a JSON object with a trailing comma.  Blobs are
        output as base64 encoded strings.  You should be using UTF8
        output encoding.
Each line as a JSON object with a trailing comma . Blobs are output as base64 encoded strings . You should be using UTF8 output encoding .
def output_json(self, header, line):
        """
        Each line as a JSON object with a trailing comma.  Blobs are
        output as base64 encoded strings.  You should be using UTF8
        output encoding.
        """
        if header:
            self._output_json_cols = line
            return
        fmt = lambda x: self.colour.colour_value(x, self._fmt_json_value(x))
        out = ["%s: %s" % (self._fmt_json_value(k), fmt(line[i])) for i, k in enumerate(self._output_json_cols)]
        self.write(self.stdout, "{ " + ", ".join(out) + "},\n")
def output_json ( self , header , line ) : if header : self . _output_json_cols = line return fmt = lambda x : self . colour . colour_value ( x , self . _fmt_json_value ( x ) ) out = [ "%s: %s" % ( self . _fmt_json_value ( k ) , fmt ( line [ i ] ) ) for i , k in enumerate ( self . _output_json_cols ) ] self . write ( self . stdout , "{ " + ", " . join ( out ) + "},\n" )