The to_json() function has multiple problems:
1) it doesn't produce valid JSON for objects containing a "bool" or "enum"
type, due to the failure to quote enum values and failure to convert boolean values,
2) it doesn't handle Bro's "interval" type at all (it just outputs an
3) it sometimes loses precision in the output of "double" values.