summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2017-06-12 14:50:55 +0200
committerAnders Broman <a.broman58@gmail.com>2017-06-16 07:41:27 +0000
commit7c28d26d71579d94f25acbaf4ab70931729d70cc (patch)
treea88dcc520e6743927a05d66fa6ff012179629633 /tshark.c
parentd01e9df47258cdd6bf66ace1d6f592773b574926 (diff)
downloadwireshark-7c28d26d71579d94f25acbaf4ab70931729d70cc.tar.gz
Refactor JSON output functions
Refactors the print.c json output functions to be more intuitive and to allow easy switching to single json keys with a json array of values instead of duplicate json keys. With this commit the json output does not change at all. These changes have been tested on multiple decrypted http2 traces with the following testing method: - Save the pcap file as json with a build of the current master branch. - Save the pcap file as json with a build of the master branch + this commit. - Compare the files for changes with the "cmp" utility. No differences were found between files for multiple different decrypted http2 traces. Printing with the "-x" or "-j" options also does not produce any changes either. Bug: 12958 Change-Id: Ibd3d39119c3a08906389aa8bbf4e2a2b21dd824e Reviewed-on: https://code.wireshark.org/review/22064 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tshark.c b/tshark.c
index eae9acf34e..60a65cb6a7 100644
--- a/tshark.c
+++ b/tshark.c
@@ -3902,12 +3902,10 @@ print_packet(capture_file *cf, epan_dissect_t *edt)
write_json_proto_tree(output_fields, print_dissections_expanded,
print_hex, protocolfilter, protocolfilter_flags,
edt, stdout);
- printf("\n");
return !ferror(stdout);
case WRITE_JSON_RAW:
write_json_proto_tree(output_fields, print_dissections_none, TRUE,
protocolfilter, protocolfilter_flags, edt, stdout);
- printf("\n");
return !ferror(stdout);
case WRITE_EK:
write_ek_proto_tree(output_fields, print_hex, protocolfilter,