Re-use function to make response in JSON