关于序列化和反序列化 [英] About serialization and de-serialization

查看:100
本文介绍了关于序列化和反序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行序列化和反序列化概念,并尝试将其与我的工作和我理解的内容联系起来,如果我错了请纠正我。



我尝试了什么:



ajax调用获取数据例如:

$ .ajax ({

url:'http:// localhost:8080 / API_SVC / api / EmployeeAPI',

类型:'GET',

dataType:'json',

成功:函数(数据){

WriteResponse(数据);

}



当我们进行ajax调用以从控制器中的动作获得响应时,我们得到响应中的对象,然后响应对象将转换为Json或xml。这样我们就可以绑定将数据返回到视图中的任何控件。这是序列化还是错误的路径。



任何人都可以帮助我理解这些s。提前致谢...

I was going through the serialization and de-serialization concepts and trying to relate it with what i worked and what I understood, please correct me if i am wrong..

What I have tried:

ajax call to Get data for example:
$.ajax({
url: 'http://localhost:8080/API_SVC/api/EmployeeAPI',
type: 'GET',
dataType: 'json',
success: function (data) {
WriteResponse(data);
}

when we make an ajax call to get a response from an action in controller, we get object in response and then response object will be converted to either in Json or xml. so That we can bind the returned data to any controls in views. Does this come under serialization or am i in the wrong path.

could anyone help me in understanding this. Thanks in advance...

推荐答案

.ajax({

url:'http:// localhost:8080 / API_SVC / api / EmployeeAPI',

类型:'GET',

dataType:'json',

成功:函数(数据){

WriteResponse(数据);

}



当我们进行ajax调用以获取来自某个操作的响应时我们在响应中得到对象,然后响应对象将转换为Json或xml。这样我们就可以将返回的数据绑定到视图中的任何控件。这是在串行化还是在错误的道路上。



任何人都可以帮助我理解这一点。在此先感谢...
.ajax({
url: 'http://localhost:8080/API_SVC/api/EmployeeAPI',
type: 'GET',
dataType: 'json',
success: function (data) {
WriteResponse(data);
}

when we make an ajax call to get a response from an action in controller, we get object in response and then response object will be converted to either in Json or xml. so That we can bind the returned data to any controls in views. Does this come under serialization or am i in the wrong path.

could anyone help me in understanding this. Thanks in advance...


这篇关于关于序列化和反序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆