English 中文(简体)
你们如何作为避风敲响下载结果?
原标题:How can you stream results as json string downloads?

我很有兴趣在我的机动车上更快地介绍结果。 能否将结果作为直截了当的下载加以分类? 我不想执行一个可以推展成果的IObserv,但我不知道用什么算法来适当整理在任何特定点可能不完整的数据。

这种希望已经足够了。

CLARIFICATION: Guess it wasn t clear enough. My issue is the string downloaded is quite long. It can often take 15-20 seconds or more to download. I want to reflect changes faster to my user, so I would like to use reactive extensions to pump out entities as soon as a complete one is received.

我的问题是,我知道如何建设能够从不完整的反应中挑选完整的实体的教区。

最佳回答

我会在这里开一席,说这在技术上是可能的,但是,你却在没有大量黑客的情况下,以现有的框架开展工作。 JSON的每一个要素都必须在被视为有效之前适当关闭。 如果你试图使一半的JSON窒息下来,那不会是具有讽刺意味的。 它不仅增加了几个“}”封闭标记,因为你可能会有部分内容被部分扼杀。 因此,你不得不把你目前为部分内容而设的“JSON”,人工关闭了剩余的每一个JSON物体,然后才放大。

在WP7号高性能框架(JSON.Net)中,即使是相对简单的物体也使用几百毫米秒。 每当服务器能提供新的数据库时,就把你整个积累起来的JSON脱光,这是毫无道理的。 自你重新解脱时代以来,出现了新的“JSON”号,其中说,必须使这片人丧生。

如果你真心希望把网络服务成果纳入主流,从而可以读到部分成果,我就不认为是你所需要的格式。 也许更简单的特别志愿人员形式会更有意义。

It might be best if instead of using Chunking+CSV, that you simply consider creating 2 types of Webmethods: InitialLoad webmethod and Paging webmethod. That is how the majority of mobile webservices I m familiar with deal with this problem.

问题回答

EDIT: Just noticed you meant WP7. Check out Reactive Extensions for .NET http://msdn.microsoft.com/en-us/devlabs/ee794896

缩略语





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签