made WifiInfo and NetworkInfo serialization implementation-independent