Skip to content

Commit a1b5a9d

Browse files
authored
Add JSON display format
1 parent 986830f commit a1b5a9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ColumnDisplayFormatDialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ ColumnDisplayFormatDialog::ColumnDisplayFormatDialog(DBBrowserDB& db, const sqlb
4242
ui->comboDisplayFormat->addItem(tr("Binary GUID to text"), "guid");
4343
ui->comboDisplayFormat->addItem(tr("SpatiaLite Geometry to SVG"), "geomToSVG");
4444
ui->comboDisplayFormat->insertSeparator(ui->comboDisplayFormat->count());
45+
ui->comboDisplayFormat->addItem(tr("JSON"), "json");
4546
ui->comboDisplayFormat->addItem(tr("Custom"), "custom");
4647

4748
ui->labelDisplayFormat->setText(ui->labelDisplayFormat->text().arg(column_name));
@@ -87,6 +88,7 @@ R"('<svg xmlns="http://www.w3.org/2000/svg">'
8788
, 1, 5)
8889
|| '" stroke="darkblue" fill="#b5cfed" stroke-width="1"/>'
8990
|| '</svg>')").arg(e_column_name);
91+
formatFunctions["json"] = "json(" + e_column_name + ")";
9092

9193
// Set the current format, if it's empty set the default format
9294
if(current_format.isEmpty())

0 commit comments

Comments
 (0)