
If you're trying to wire out JSON that faithfully reproduces the structure of a dissected packet, this is good, because:

JSON, as specified by the second edition of the ECMA-404 spec, doesn't require that the names of members of an objects be unique.

E occurrence=f and -E occurrence=l cause only the first or last occurrence, respectively, to be reported, but the code doesn't treat that specially, either. Perhaps it should have been called "fields" in that case, but it wasn't.Ģ) Why is each field an array of one value (as opposed to not being an array)?īecause, without -E occurrence= or with -E occurrence=a, all occurrences of a given field in a packet are reported, and the code doesn't create "there's only one occurrence" as a special case. 1) What exactly are "layers" in this context?Īn attempt to make the JSON syntaxes for -T json without any -e options, and -T json with -e options, more like each other?įor -T json without any -e options, "layers" is an object containing multiple protocol layers each protocol layer is an object containing the fields in that protocol layer.įor -T json with -e options, it's an object containing all of the fields being reported.
