JSON 中的 .d 是什么意思? [英] What does .d in JSON mean?

查看:40
本文介绍了JSON 中的 .d 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从 jQuery 调用的 .NET webmethod.该方法返回一些我在 DIV 元素中显示的 HTML 标记.

I have a .NET webmethod that I have called from jQuery. The method returns some HTML markup that I display within a DIV element.

一旦我得到我使用的回复

Once I have the response I use

$("#div").html(result.d);

我的问题是,.d 有什么作用?我不喜欢使用我不完全理解的代码?我可以使用 Eval 获得相同的结果吗?

My question is, what does the .d do? I don't like using code I don't fully understand? Could I get the same result using Eval?

推荐答案

您指的是 ADO.NET 数据服务吗?

Are you referring to the ADO.NET Data Services?

我记得听过一个关于 JSON 返回这个的演示,我认为它只是一个包装器,用于确保有效负载是一个 JSON 对象,而不是一个数组(这是返回多个实体的情况).

I remember hearing a presentation about the JSON returning this and I think its just a wrapper to ensure the payload is a JSON object as opposed to an array (which is the case of returning multiple entities).

为什么特别是d"?我想我记得他们说过类似好吧,它必须是某种东西"之类的话.

Why 'd' specifically? I think I remember them saying something like 'well it had to be something'.

这篇关于JSON 中的 .d 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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