Doc headers in bulk assembled and JSON dumped.

 - instead of plain string assembly of JSON