Atitit 编程 序列化技术点 概念原理v2
3.2. Form提交为 json对象,适合后端对象解析 1
6.3. php序列号字串 var_export 和 eval var_export 函数把变量作为一个字符串输出;eval把字符串当成PHP代码来执行,反序列化得到最初变量的内容。 2
- 序列化: 将数据结构或对象转换成二进制串或字符串的过程
- 反序列化:将在序列化过程中所生成的二进制串转换成数据结构或者对象的过程
互联网早期的序列化协议主要有COM和CORBA。
Json序列化
序列化表单值的作用是将表单中的值拼装成字符串形式的key-value键值对提交给后台服务器程序解析,来获取用户的输入值最总看到的效果如下
name=124&company=baidu.com&fav=1,2,3
作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 )
汉字名:艾提拉(艾龙), EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax
以下数据来自https://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking
数据流2700条 ,所用时间 --time(ms):748 生成文件大小 450kb
/atiplat_cms/src/com/attilax/office/ExcelTest.java
public static void main(String[] args) {
String f = "c:\\功能表.xlsx";
f="C:\\0Html\\gv_material.xlsx";
List<Map> li = new excelUtil2007().toListMap(f);
long longstart=System.currentTimeMillis();
SerializePerson(li);
long end=System.currentTimeMillis();
System.out.println("--time(ms):"+(end-longstart));
// System.out.println(AtiJson.toJson(li));
System.out.println("---f");
// li=new ExcelTest().clear(li);
// li.
}
private static void SerializePerson(Object o)
{
// ObjectOutputStream 对象输出流,将Person对象存储到E盘的Person.txt文件中,完成对Person对象的序列化操作
ObjectOutputStream oo;
try {
FileOutputStream fileOutputStream = new FileOutputStream(
new File("c:/Person.txt"));
oo = new ObjectOutputStream(fileOutputStream);
oo.writeObject(o);
System.out.println("Person对象序列化成功!");
oo.close();
} catch (IOException e) {
ExUtil.throwExV2(e);
}
}
material_id | material_description | material_type | create_user | create_time | effectie_time | failure_time | size | file_path | can_down_org | update_user | update_time | application_type | play_time | logicDel | thumb | year | area | detail | material_keyword | txt_file | special_id |
8130 | 神探 | 4 |
|
|
|
|
| 港台国产\神探 豆瓣8.5\神探.mkv |
|
|
|
| 0 |
| 港台国产\神探 豆瓣8.5\神探.jpg |
|
| 港台国产\神探 豆瓣8.5\神探.txt | st | 港台国产\神探 豆瓣8.5\神探.txt |
|
8131 | 潜龙风云 | 4 |
|
|
|
|
| 港台国产\潜龙风云 港台巨星\潜龙风云.mkv |
|
|
|
| 0 |
| 港台国产\潜龙风云 港台巨星\潜龙风云.jpg |
|
|
| qlfy | 港台国产\潜龙风云 港台巨星\潜龙风云.txt |
|
8132 | 甜蜜蜜 | 4 |
|
|
|
|
| 港台国产\甜蜜蜜 豆瓣8.7 [经典华语爱情片]\甜蜜蜜.mkv |
|
|
|
| 0 |
| 港台国产\甜蜜蜜 豆瓣8.7 [经典华语爱情片]\甜蜜蜜.jpg |
|
|
| tmm | 港台国产\甜蜜蜜 豆瓣8.7 [经典华语爱情片]\甜蜜蜜.txt |
|
参考资料
序列化和反序列化_知识库_博客园.html
Atiend