diff --git a/src/output_modules/module_json.c b/src/output_modules/module_json.c index 096540c..594b54c 100644 --- a/src/output_modules/module_json.c +++ b/src/output_modules/module_json.c @@ -149,13 +149,13 @@ int json_output_file_ip(fieldset_t *fs) field_t *f = &(fs->fields[i]); if (f->type == FS_STRING) { json_object_object_add(obj, f->name, - json_object_new_string((char*) f->value)); + json_object_new_string((char *) f->value.ptr)); } else if (f->type == FS_UINT64) { json_object_object_add(obj, f->name, - json_object_new_int((int) f->value)); + json_object_new_int((int) f->value.num)); } else if (f->type == FS_BINARY) { json_output_file_store_data(obj, - (const u_char*) f->value, f->len); + (const u_char*) f->value.ptr, f->len); } else if (f->type == FS_NULL) { // do nothing } else {