Your comments

I don't think JSON would be better - you'd have to do a lot of quote escaping and such.

XML is a better format in this case.

You can remove carets by clicking with cmd+option+shift.
I agree a simple cmd+click on an existing caret should also remove it though.

I agree, even files of about 5000 lines start to slow down considerably.