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
44 lines
1.2 KiB
XML
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><html><head/><body><p>Avoid duplicate keys in the JSON by using a list for sibling fields with the same key</p></body></html></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>
|