row_to_json ( record [, boolean ] ) → jsonConverts an SQL composite value to a JSON object. The behavior is the same as to_json except that line feeds will be added between top-level elements if the optional boolean parameter is true.row_to_json(row(1,'foo')) → {"f1":1,"f2":"foo"}