Do not create buffer, write to the response stream directly

This removes the need to create an inmemory buffer to encode the struct into json.  You can write directly to the response stream.