pub fn serialize_to_json<T: Serialize>(item: &T) -> Result<String, RedisError>
Serializes an item to a JSON string with proper error handling.