wireshark/ui/qt/packet_format_json_group_box.ui
John Thacker 070a394402 Qt: Enable JSON no duplicate keys options from the GUI
Enable access to the JSON "no-duplicate-keys" option available in
tshark in the GUI as well. Continue to default to it off, same as
in tshark.

As part of this, have the Export Dissections dialog packet format
group box be a stacked widget, allowing different per format
options. Note the current options are only valid for text (and
PostScript, but Export Dissections doesn't do that.) This could allow
support for CSV options, e.g. see #14260.

Have the different format group boxes be responsible for checking
validity and setting the print arguments, to reduce duplicate code
between Export Dissections and Print, and keep those widgets from
having to understand details of the group boxes.

Note that the current "no duplicate keys" format has limitations of
its own, because it doesn't preserve order in cases where there
are multiple siblings of the same field at the same tree level but
not consecutive (i.e., with other fields between them.) They will
be placed together. A different strategy, that involves even more
use of arrays, would be necessary to preserve order. (See also
issue #12958.)

Ping #13904, #19295, #19329
2025-03-05 07:16:13 +01:00

44 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PacketFormatJSONGroupBox</class>
<widget class="QGroupBox" name="PacketFormatJSONGroupBox">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>199</height>
</rect>
</property>
<property name="windowTitle">
<string>GroupBox</string>
</property>
<property name="title">
<string>Packet Format</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="dupKeysCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Avoid duplicate keys in the JSON by using a list for sibling fields with the same key&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>No duplicate keys</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
</layout>
</widget>
<connections/>
</ui>