Make sure the content type is json when returning single objects.

fixes issue #392