Streaming configurably terminated JSON serialiser