1. 程式人生 > >各種型別資料對序列化的支援程度

各種型別資料對序列化的支援程度

              型別                                                              是否支援序列化

簡單型別int,String,Boolean等                                 支援

String[]                                                                               支援

Boolean[]                                                                          支援

int[]                                                                                     支援

String[][]                                                                             支援

int[][]                                                                                   支援

ArrayList                                                                            支援

Calendar                                                                          支援

JSONObject                                                                    不支援

JSONArray                                                                       不支援

HashMap<String,Object>                                         因為Object可能是不支援序列號的JSONObject型別,所以HashMap<String,Object>不一定支援序列化

ArrayList<HushMap<String,Object>>                     因為Object可能是不支援序列號的JSONObject型別,所以ArrayList<HushMap<String,Object>>不一定支援序列化