pub fn serialize<T, S>(target: T, ser: S) -> Result<S::Ok, S::Error>where
    S: Serializer,
    T: ToHex,