Add packet type to json output.

This commit is contained in:
Ian Gulliver
2016-02-17 12:13:21 -08:00
parent c18a03d2e1
commit ca0e1db556

1
json.c
View File

@@ -41,6 +41,7 @@ static void json_hello(struct buf *buf) {
static void json_add_common(struct packet *packet, json_t *obj) {
json_object_set_new(obj, "backend_id", json_string(packet->backend->id));
json_object_set_new(obj, "type", json_string(packet_type_names[packet->type]));
if (packet->mlat_timestamp) {
json_object_set_new(obj, "mlat_timestamp", json_integer(packet->mlat_timestamp));
}