analyze_line collects all the data.

Now dump it into JSON and the JS code should use it.