implement document JSON writers, serve JSON HTTP responses