datajson: output context to "context"

Using `alert.extra` was not really reflecting the nature of what
was added. So renaming it to `alert.context`.
pull/13432/head
Eric Leblond 3 months ago committed by Victor Julien
parent 0bc21eec48
commit b03d4f8e1a

@ -19,10 +19,10 @@
"gid": { "gid": {
"type": "integer" "type": "integer"
}, },
"extra": { "context": {
"type": "object", "type": "object",
"additionalProperties": true, "additionalProperties": true,
"description": "Extra data created by keywords such as dataset with JSON" "description": "Extra context data created by keywords such as dataset with JSON"
}, },
"metadata": { "metadata": {
"type": "object", "type": "object",
@ -2999,8 +2999,8 @@
} }
}, },
"additionalProperties": true "additionalProperties": true
}, }
}, }
}, },
"optional": true "optional": true
}, },

@ -254,7 +254,7 @@ void AlertJsonHeader(const Packet *p, const PacketAlert *pa, SCJsonBuilder *js,
} }
if (pa->json_info.json_string != NULL) { if (pa->json_info.json_string != NULL) {
SCJbOpenObject(js, "extra"); SCJbOpenObject(js, "context");
const struct ExtraDataJsonList *json_info = &pa->json_info; const struct ExtraDataJsonList *json_info = &pa->json_info;
while (json_info) { while (json_info) {
SCJbSetFormatted(js, json_info->json_string); SCJbSetFormatted(js, json_info->json_string);

Loading…
Cancel
Save