compute_intersections: add a JSON output format