Make sure return data is valid JSON