Return value as JSON.